Sensing subsystem

Browse source code on GitHub

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:

  1. Define the sensor in the dts

  2. Open the sensor

  3. Register call back.

  4. Set sample interval

  5. Run forever and get the sensor data.

Building and Running

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

west build -b native_sim samples/subsys/sensing/simple
west build -t run

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

See also

Sensing Subsystem API