zephyr/samples/sensor/co2_polling
Benjamin Cabé ee77704715 samples: sensor: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 21:26:50 +02:00
..
boards
src
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. zephyr:code-sample:: co2
   :name: Generic CO2 polling sample
   :relevant-api: sensor_interface

   Get CO2 data from a sensor (polling mode).

Overview
********

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.

.. zephyr-app-commands::
   :zephyr-app: samples/sensor/co2_polling
   :board: <board to use>
   :goals: build flash
   :compact:

Sample Output
=============

.. code-block:: console

   CO2 940 ppm
   CO2 950 ppm

<repeats endlessly>