zephyr/samples/subsys/sensing/simple
Swift Tian 2a639c9148 samples: subsys: fix sensing/simple compile
Add CONFIG_EMUL=y to native_sim.conf

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-05-24 18:03:44 -04:00
..
boards samples: subsys: fix sensing/simple compile 2024-05-24 18:03:44 -04:00
src sensing: Fix initializer compile-time constant 2024-01-24 10:32:10 +01:00
app.overlay
CMakeLists.txt
prj.conf
README.rst
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 :ref:`native_sim <native_sim>` as follows:

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

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