zephyr/samples/sensor/lps22hb
Marc Herbert 2cd51a33ce samples: make find_package(Zephyr...) REQUIRED
This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-05-29 10:47:25 +02:00
..
src samples: sensor: Convert to new DT_INST macros 2020-03-31 07:09:33 -05:00
CMakeLists.txt samples: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
prj.conf samples: sensor: lps22hb: add sample 2019-10-22 17:56:56 -05:00
README.rst doc: fix LPS22HB doc indentation 2019-11-20 17:47:20 -05:00
sample.yaml samples: sensor: lps22hb: add sample 2019-10-22 17:56:56 -05:00

.. _lps22hb:

LPS22HB: Temperature and Humidity Monitor
#########################################

Overview
********
This sample periodically reads pressure from the LPS22HB MEMS pressure
sensor and displays it on the console.


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

This sample uses the LPS22HB sensor controlled using the I2C interface.

References
**********

- LPS22HB: http://www.st.com/en/mems-and-sensors/lps22hb.html

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

This project outputs sensor data to the console. It requires an LPS22HB
sensor, which is present on the disco_l475_iot1 board.

.. zephyr-app-commands::
   :zephyr-app: samples/sensor/lps22hb
   :board: disco_l475_iot1
   :goals: build
   :compact:

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

.. code-block:: console

   Observation:1
   Pressure:98.7 kPa
   Temperature:22.5 C
   Observation:2
   Pressure:98.7 kPa
   Temperature:22.5 C
   Observation:3
   Pressure:98.7 kPa
   Temperature:22.5 C

   <repeats endlessly every 2 seconds>