1.. zephyr:code-sample:: x-nucleo-iks01a2-std 2 :name: X-NUCLEO-IKS01A2 shield - Standard (Mode 1) 3 :relevant-api: sensor_interface 4 5 Interact with all the sensors of an X-NUCLEO-IKS01A2 shield using Standard Mode. 6 7Overview 8******** 9This sample enables all sensors of a X-NUCLEO-IKS01A2 shield, and then 10periodically reads and displays data from the shield sensors: 11 12- HTS221: Ambient temperature and relative humidity 13- LPS22HB: Atmospheric pressure and ambient temperature 14- LSM6DSL: 3-Axis Acceleration and 3-Axis Angular Velocity 15- LSM303AGR 3-Axis Acceleration and 3-axis Magnetic field intensity 16 17Requirements 18************ 19 20This sample communicates over I2C with the X-NUCLEO-IKS01A2 shield 21stacked on a board with an Arduino connector. The board's I2C must be 22configured for the I2C Arduino connector in the devicetree. See for 23example the :ref:`nucleo_f401re_board` board source code: 24 25- :zephyr_file:`boards/arm/nucleo_f401re/nucleo_f401re.dts` 26- :zephyr_file:`boards/arm/nucleo_f401re/arduino_r3_connector.dtsi` 27 28Please note that this sample can't be used with boards already supporting 29one of the sensors available on the shield (such as disco_l475_iot1) as zephyr 30does not yet support sensors multiple instances. 31 32References 33********** 34 35-X-NUCLEO-IKS01A2: https://www.st.com/en/ecosystems/x-nucleo-iks01a2.html 36 37Building and Running 38******************** 39 40This sample runs with X-NUCLEO-IKS01A2 stacked on any board with a matching 41Arduino connector. For this example, we use a :ref:`nucleo_f401re_board` board. 42 43.. zephyr-app-commands:: 44 :zephyr-app: samples/shields/x_nucleo_iks01a2/standard 45 :board: nucleo_f401re 46 :goals: build 47 :compact: 48 49Sample Output 50============= 51 52 .. code-block:: console 53 54 X-NUCLEO-IKS01A2 sensor dashboard 55 56 HTS221: Temperature: 26.3 C 57 HTS221: Relative Humidity: 44.5% 58 LPS22HB: Pressure:99.220 kpa 59 LPS22HB: Temperature: 26.1 C 60 LSM6DSL: Accel (m.s-2): x: -0.0, y: -0.1, z: 10.0 61 LSM6DSL: Gyro (dps): x: 0.028, y: -0.025, z: 0.014 62 LSM303AGR: Accel (m.s-2): x: 0.3, y: -0.1, z: 9.7 63 LSM303AGR: Magn (gauss): x: -0.221, y: -0.042, z: -0.458 64 65 <updated endlessly every 2 seconds> 66