2019-10-17 01:11:18 +08: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
|
|
|
|
**********
|
|
|
|
|
2019-11-21 02:52:58 +08:00
|
|
|
- LPS22HB: http://www.st.com/en/mems-and-sensors/lps22hb.html
|
2019-10-17 01:11:18 +08:00
|
|
|
|
|
|
|
Building and Running
|
|
|
|
********************
|
|
|
|
|
2019-11-21 02:52:58 +08:00
|
|
|
This project outputs sensor data to the console. It requires an LPS22HB
|
|
|
|
sensor, which is present on the disco_l475_iot1 board.
|
2019-10-17 01:11:18 +08:00
|
|
|
|
|
|
|
.. zephyr-app-commands::
|
|
|
|
:zephyr-app: samples/sensor/lps22hb
|
|
|
|
:board: disco_l475_iot1
|
|
|
|
:goals: build
|
|
|
|
:compact:
|
|
|
|
|
|
|
|
Sample Output
|
|
|
|
=============
|
|
|
|
|
2019-11-21 02:52:58 +08:00
|
|
|
.. code-block:: console
|
2019-10-17 01:11:18 +08:00
|
|
|
|
2019-11-21 02:52:58 +08:00
|
|
|
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
|
2019-10-17 01:11:18 +08:00
|
|
|
|
2019-11-21 02:52:58 +08:00
|
|
|
<repeats endlessly every 2 seconds>
|