ST SensorTile.box Pro on-board sensors test
This sample provides an example of how to read sensors data from the SensorTile.box Pro board.
This sample enables all sensors of SensorTile.box Pro board, and then periodically reads and displays data on the console from the following sensors:
HTS221: ambient temperature and relative humidity
LPS22DF: ambient temperature and atmospheric pressure
LSM6DSV16X: 6-Axis acceleration and angular velocity
The application requires a SensorTile.box Pro board connected to the PC through USB. The board shows up as a USB CDC class standard device.
Building and Running
Build and flash the sample in the following way:
# From the root of the zephyr repository west build -b sensortile_box_pro samples/boards/sensortile_box_pro/sensors-on-board west flash
Please note that flashing the board requires a few preliminary steps described in ST SensorTile.box PRO.
Then, power cycle the board by disconnecting and reconnecting the USB cable. Run your favorite terminal program to listen for output.
$ minicom -D <tty_device> -b 115200
<tty_device> with the correct device path automatically created on
the host after the SensorTile.box Pro board gets connected to it,
/dev/ttyACMx (with x being 0, 1, 2, …).
-b option sets baud rate ignoring the value from config.
The sample code outputs sensors data on the SensorTile.box Pro console.
SensorTile.box Pro dashboard HTS221: Temperature: 26.4 C HTS221: Relative Humidity: 60.5% LPS22DF: Temperature: 28.4 C LPS22DF: Pressure:99.694 kpa LSM6DSV16X: Accel (m.s-2): x: -0.158, y: 0.158, z: 9.811 LSM6DSV16X: GYro (dps): x: 0.003, y: 0.000, z: -0.005 1:: lsm6dsv16x acc trig 836 1:: lsm6dsv16x gyr trig 836 <repeats endlessly every 2s>