zephyr/samples/shields/x_nucleo_iks01a2
Henrik Brix Andersen 5e2e1ab3ea samples: shields: x_nucleo_iks0xax: exclude lpcxpresso55s16_ns board
Exclude the NXP LPCXpresso55S16 board from the X-NUCLEO-IKS0xAx
samples, since the rely on having Arduino Uno header A3 available.

On the LPCXpresso55S16, A3 is connected through a resistor (R63) which
is not mounted by default.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-06-19 15:18:16 +02:00
..
src samples: shields: Convert to new DT_INST macros 2020-03-30 17:05:30 -05:00
CMakeLists.txt samples: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
prj.conf drivers/i2c: Kconfig.stm32: Enable interrupts usage by default 2020-01-24 21:34:45 -05:00
README.rst doc: s/device tree/devicetree/ 2019-10-08 11:53:40 +02:00
sample.yaml samples: shields: x_nucleo_iks0xax: exclude lpcxpresso55s16_ns board 2020-06-19 15:18:16 +02:00

.. _x-nucleo-iks01a2-sample:

X-NUCLEO-IKS01A2: MEMS inertial and environmental multi-sensor shield
#####################################################################

Overview
********
This sample enables all sensors of a X-NUCLEO-IKS01A2 shield, and then
periodically reads and displays data from the shield sensors:

- HTS221: Ambient temperature and relative humidity
- LPS22HB: Atmospheric pressure and ambient temperature
- LSM6DSL: 3-Axis Acceleration and 3-Axis Angular Velocity
- LSM303AGR 3-Axis Acceleration and 3-axis Magnetic field intensity

Requirements
************

This sample communicates over I2C with the X-NUCLEO-IKS01A2 shield
stacked on a board with an Arduino connector. The board's I2C must be
configured for the I2C Arduino connector (both for pin muxing
and devicetree). See for example the :ref:`nucleo_f401re_board` board
source code:

- :zephyr_file:`boards/arm/nucleo_f401re/nucleo_f401re.dts`
- :zephyr_file:`boards/arm/nucleo_f401re/pinmux.c`

Please note that this sample can't be used with boards already supporting
one of the sensors available on the shield (such as disco_l475_iot1) as zephyr
does not yet support sensors multiple instances.

References
**********

-X-NUCLEO-IKS01A2: http://www.st.com/en/ecosystems/x-nucleo-iks01a2.html

Building and Running
********************

This sample runs with X-NUCLEO-IKS01A2 stacked on any board with a matching
Arduino connector. For this example, we use a :ref:`nucleo_f401re_board` board.

.. zephyr-app-commands::
   :zephyr-app: samples/shields/x_nucleo_iks01a2
   :board: nucleo_f401re
   :goals: build
   :compact:

Sample Output
=============

 .. code-block:: console

    X-NUCLEO-IKS01A2 sensor dashboard

    HTS221: Temperature: 26.3 C
    HTS221: Relative Humidity: 44.5%
    LPS22HB: Pressure:99.220 kpa
    LPS22HB: Temperature: 26.1 C
    LSM6DSL: Accel (m.s-2): x: -0.0, y: -0.1, z: 10.0
    LSM6DSL: Gyro (dps): x: 0.028, y: -0.025, z: 0.014
    LSM303AGR: Accel (m.s-2): x: 0.3, y: -0.1, z: 9.7
    LSM303AGR: Magn (gauss): x: -0.221, y: -0.042, z: -0.458

    <updated endlessly every 2 seconds>