This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Generic CO2 polling sample


A sensor sample that demonstrates how to poll a CO2 sensor.

Building and Running

This sample reads the CO2 sensor and print the values continuously.

west build -b <board to use> samples/sensor/co2_polling
west flash

Sample Output

CO2 940 ppm
CO2 950 ppm

<repeats endlessly>