zephyr/samples/shields/x_nucleo_iks01a1
Erwan Gouriou 0115c47b69 cmake: dts: move to specifying shield on the command line
Rather than specifying SHIELD via Kconfig, we move it to being
specified via the command line, similar to board.

So we can do:

  -DSHIELD=x_nucleo_iks01a1

or, for multiple shields:

  -DSHIELD="x_nucleo_iks01a1 frdm_kw41z"

Following cmake change, update x_nucleo_iks01a1 sample in order
not to enable CONFIG option anymore but set SHIELD cmake option.

Last, update documentation to reflect this change.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 13:20:59 -06:00
..
src sensors: hts221: Convert to new DT_<COMPAT>_<INSTANCE> defines 2019-01-17 11:06:38 -06:00
CMakeLists.txt cmake: dts: move to specifying shield on the command line 2019-01-18 13:20:59 -06:00
README.rst cmake: dts: move to specifying shield on the command line 2019-01-18 13:20:59 -06:00
prj.conf cmake: dts: move to specifying shield on the command line 2019-01-18 13:20:59 -06:00
sample.yaml cmake: dts: move to specifying shield on the command line 2019-01-18 13:20:59 -06:00

README.rst

.. _x-nucleo-iks01a1-sample:

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

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

- HTS221: Temperature and humidity
- LPS25HB: Atmospheric pressure
- LIS3MDL: 3-axis Magnetic field intensity
- LSM6DSL: 3-Axis Acceleration

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

This sample communicates over I2C with the X-NUCLEO-IKS01A1 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 device tree).
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-IKS01A1: http://www.st.com/en/ecosystems/x-nucleo-iks01a1.html

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

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

.. zephyr-app-commands::
   :zephyr-app: samples/shields/x_nucleo_iks01a1
   :board: nucleo_f429zi
   :goals: build
   :compact:

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

 .. code-block:: console

    X-NUCLEO-IKS01A1 sensor dashboard

    HTS221: Temperature:29.1 C
    HTS221: Relative Humidity:46.0%
    LPS25HB: Pressure:100.0 kpa
    LIS3MDL: Magnetic field (gauss): x: 0.1, y: -0.4, z: 0.4
    LSM6DS0: Acceleration (m.s-2): x: -0.0, y: -0.1, z: 9.7


    <updated endlessly every 2 seconds>