mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-01 08:16:23 +00:00
Using find_package to locate Zephyr. Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate code. Whenever an automatic run of CMake happend by the build system / IDE then it was required that ZEPHYR_BASE was defined. Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to cache the base variable and thus allowing subsequent invocation even if ZEPHYR_BASE is not set in the environment. It also removes the risk of strange build results if a user switchs between different Zephyr based project folders and forgetting to reset ZEPHYR_BASE before running ninja / make. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
prj.conf | ||
README.rst | ||
sample.yaml |
.. _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>