zephyr/samples/sensor/hts221
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 coccinelle: standardize k_sleep calls with integer timeouts 2019-10-09 08:38:10 -04:00
CMakeLists.txt samples: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
prj.conf sample: fix configuration for sensor HTS221 sample application 2018-01-13 09:06:58 -08:00
README.rst doc: fix broken file and zephyr-app refs 2019-10-08 15:42:32 -05:00
sample.yaml samples: add test identifier 2019-03-29 17:44:11 -04:00

.. _hts221:

HTS221: Temperature and Humidity Monitor
########################################

Overview
********
This sample periodically reads temperature and humidity from the HTS221
Temperature & Humidity Sensor and displays it on the console


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

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

References
**********

 - HTS211: http://www.st.com/en/mems-and-sensors/hts221.html

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

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

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

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

 .. code-block:: console

    Temperature:25.3 C
    Relative Humidity:40%
    Temperature:25.3 C
    Relative Humidity:40%
    Temperature:25.3 C
    Relative Humidity:40%
    Temperature:25.3 C
    Relative Humidity:40%

    <repeats endlessly every 2 seconds>