zephyr/samples/sensor/dht
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
..
boards boards: nrf52_pca10040: Rename to nrf52dk_nrf52832 2020-04-06 13:09:07 +02:00
src zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
CMakeLists.txt samples: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
prj.conf samples: sensor: dht: add sample 2019-12-19 06:43:37 -06:00
README.rst boards: nrf52_pca10040: Rename to nrf52dk_nrf52832 2020-04-06 13:09:07 +02:00
sample.yaml boards: nrf52_pca10040: Rename to nrf52dk_nrf52832 2020-04-06 13:09:07 +02:00

.. _dht:

DHT: Aosong DHT Digital-output Humidity and Temperature Sensor
##############################################################

Description
***********

This sample application periodically (0.5 Hz) measures the ambient
temperature and humidity. The result is written to the console.

Wiring
*******

This sample uses an external breakout for the sensor.  A devicetree
overlay must be provided to identify the sensor variant and the GPIO
used to control the sensor.

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

After providing a devicetree overlay that specifies the sensor location,
build this sample app using:

.. zephyr-app-commands::
   :zephyr-app: samples/sensor/dht
   :board: nrf52dk_nrf52832
   :goals: build flash

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

.. code-block:: console

   *** Booting Zephyr OS build zephyr-v2.1.0-329-g38418b26c4cc  ***
   [0:00:00.027]: 20.0 Cel ; 48.7 %RH
   [0:00:02.053]: 19.8 Cel ; 48.7 %RH
   [0:00:04.079]: 20.0 Cel ; 48.7 %RH
   [0:00:06.105]: 19.8 Cel ; 48.7 %RH
   [0:00:08.130]: 20.0 Cel ; 48.8 %RH
   [0:00:10.156]: 20.1 Cel ; 48.8 %RH
   [0:00:12.182]: 19.7 Cel ; 48.7 %RH
   [0:00:14.207]: 20.0 Cel ; 48.8 %RH

<repeats endlessly>