zephyr/samples/subsys/sensing/simple
Benjamin Cabé 4f1cd0e428 doc: Migrate subsys/ code samples to new Sphinx extension
This migrates the subsys code samples to the new Sphinx code-sample
extension, making it easier to find relevant samples when browsing
API reference.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-21 09:28:31 +02:00
..
boards
src
app.overlay
CMakeLists.txt
prj.conf
README.rst doc: Migrate subsys/ code samples to new Sphinx extension 2023-09-21 09:28:31 +02:00
sample.yaml

.. zephyr:code-sample:: sensing
   :name: Sensing subsystem
   :relevant-api: sensing_api

   Get high-level sensor data in defined intervals.

Overview
********

A simple sample that shows how to use the sensors with sensing subsystem APIs. It defines
two sensors, with the underlying device bmi160 emulator, and gets the sensor
data in defined interval.

The program runs in the following sequence:

#. Define the sensor in the dts

#. Open the sensor

#. Register call back.

#. Set sample interval

#. Run forever and get the sensor data.

Building and Running
********************

This application can be built and executed on native_posix as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/sensing/simple
   :host-os: unix
   :board: native_posix
   :goals: run
   :compact:

To build for another board, change "native_posix" above to that board's name.
At the current stage, it only support native posix