1.. _sensortile_box sensors:
2
3ST SensorTile.box
4#################
5
6Overview
7********
8This sample provides an example of how to read sensors data
9from the SensorTile.box board.
10
11This sample enables all sensors of SensorTile.box board, and then
12periodically reads and displays data on the console from the following
13sensors:
14
15- HTS221: ambient temperature and relative humidity
16- LPS22HH: ambient temperature and atmospheric pressure
17- LIS2DW12: 3-Axis acceleration
18- LSM6DSOX: 6-Axis acceleration and angular velocity
19- STTS751: temperature sensor
20
21Requirements
22************
23
24The application requires a SensorTile.box board connected to the PC
25through USB. The board declares itself as a USB CDC class device.
26
27References
28**********
29
30- :ref:`sensortile_box`
31
32Building and Running
33********************
34
35Build and flash the sample in the following way:
36
37.. zephyr-app-commands::
38    :zephyr-app: samples/boards/sensortile_box
39    :board: sensortile_box
40    :goals: build flash
41
42Please note that flashing the board requires a few preliminary steps described
43in :ref:`sensortile_box`.
44
45Then, power cycle the board by disconnecting and reconnecting the USB cable.
46Run your favorite terminal program to listen for output.
47
48.. code-block:: console
49
50   $ minicom -D <tty_device> -b 115200
51
52Replace :code:`<tty_device>` with the port where the SensorTile.box board
53can be found. For example, under Linux, :code:`/dev/ttyUSB0`.
54The ``-b`` option sets baud rate ignoring the value from config.
55
56Sample Output
57=============
58
59The sample code outputs sensors data on the SensorTile.box console.
60
61 .. code-block:: console
62
63    SensorTile.box dashboard
64
65    HTS221: Temperature: 26.4 C
66    HTS221: Relative Humidity: 60.5%
67    LPS22HH: Temperature: 28.4 C
68    LPS22HH: Pressure:99.694 kpa
69    LIS2DW12: Accel (m.s-2): x: 0.306, y: -0.459, z: 10.031
70    IIS3DHHC: Accel (m.s-2): x: -0.581, y: 0.880, z: -9.933
71    LSM6DSOX: Accel (m.s-2): x: -0.158, y: 0.158, z: 9.811
72    LSM6DSOX: GYro (dps): x: 0.003, y: 0.000, z: -0.005
73    STTS751: Temperature: 27.0 C
74    1:: lps22hh trig 206
75    1:: lis2dw12 trig 410
76    1:: lsm6dsox acc trig 836
77    1:: lsm6dsox gyr trig 836
78    1:: iis3dhhc trig 2422
79
80    <repeats endlessly every 2s>
81
82If you move the board around or put your finger on the temperature
83sensor, you will see the accelerometer, gyro, and temperature values change.
84