• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

boards/04-Jan-2025-147

src/04-Jan-2025-515400

CMakeLists.txtD04-Jan-2025385 1511

README.rstD04-Jan-20252.8 KiB9268

app.overlayD04-Jan-2025349 2016

prj.confD04-Jan-2025430 1815

sample.yamlD04-Jan-2025347 1817

README.rst

1.. zephyr:code-sample:: x-nucleo-iks01a3-std
2   :name: X-NUCLEO-IKS01A3 shield - Standard (Mode 1)
3   :relevant-api: sensor_interface
4
5   Interact with all the sensors of an X-NUCLEO-IKS01A3 shield using Standard mode.
6
7Overview
8********
9This sample is provided as an example to test the X-NUCLEO-IKS01A3 shield
10configured in Standard mode (Mode 1).
11Please refer to :ref:`x-nucleo-iks01a3` for more info on this configuration.
12
13This sample enables all sensors of a X-NUCLEO-IKS01A3 shield, and then
14periodically reads and displays data from the shield sensors:
15
16- HTS221: ambient temperature and relative humidity
17- LPS22HH ambient temperature and atmospheric pressure
18- LIS2MDL 3-Axis magnetic field intensity
19- LIS2DW12 3-Axis acceleration
20- LSM6DSO 6-Axis acceleration and angular velocity
21- STTS751 temperature sensor
22
23Requirements
24************
25
26This sample communicates over I2C with the X-NUCLEO-IKS01A3 shield
27stacked on a board with an Arduino connector. The board's I2C must be
28configured for the I2C Arduino connector (both for pin muxing
29and devicetree). See for example the :zephyr:board:`nucleo_f401re` board
30source code:
31
32- :file:`$ZEPHYR_BASE/boards/arm/nucleo_f401re/nucleo_f401re.dts`
33- :file:`$ZEPHYR_BASE/boards/arm/nucleo_f401re/pinmux.c`
34
35Please note that this sample can't be used with boards already supporting
36one of the sensors available on the shield (such as disco_l475_iot1)
37as sensors multiple instances are not supported.
38
39References
40**********
41
42- X-NUCLEO-IKS01A3: https://www.st.com/en/ecosystems/x-nucleo-iks01a3.html
43
44DIL24 socket
45************
46
47In addition to sensors on board it is possible to place any other compatible
48sensor on DIL24 socket. The sample is written in such a way that, if sensor is
49not present, it will just be skipped.
50
51List of sensors currently supported on DIL24 by this sample:
52
53- LIS2DE12
54
55Building and Running
56********************
57
58This sample runs with X-NUCLEO-IKS01A3 stacked on any board with a matching
59Arduino connector. For this example, we use a :zephyr:board:`nucleo_f401re` board.
60
61.. zephyr-app-commands::
62   :zephyr-app: samples/shields/x_nucleo_iks01a3/standard/
63   :host-os: unix
64   :board: nucleo_f401re
65   :goals: build
66   :compact:
67
68Sample Output
69=============
70
71 .. code-block:: console
72
73
74    X-NUCLEO-IKS01A3 sensor dashboard
75
76    HTS221: Temperature: 27.5 C
77    HTS221: Relative Humidity: 27.0%
78    LPS22HH: Temperature: 27.3 C
79    LPS22HH: Pressure:99.150 kpa
80    STTS751: Temperature: 27.6 C
81    LIS2MDL: Magn (gauss): x: -0.445, y: -0.054, z: -0.066
82    LIS2MDL: Temperature: 26.8 C
83    LIS2DW12: Accel (m.s-2): x: -0.413, y: 0.077, z: 10.337
84    LSM6DSO: Accel (m.s-2): x: 0.133, y: -0.133, z: 10.102
85    LSM6DSO: GYro (dps): x: 0.000, y: -0.006, z: -0.058
86    1:: lis2mdl trig 208
87    1:: lps22hh trig 214
88    1:: lsm6dso acc trig 426
89    1:: lsm6dso gyr trig 426
90
91    <updated endlessly every 2 seconds>
92