Simple, Stable and Fast Arduino Temp & Humidity Sensors for DHT11 and DHT22.
- Simple: Simple C++ code with lots of comments.
- Stable: Strictly follow the standard DHT protocol.
- Fast: Support 0.5HZ(DHT22) or 1HZ(DHT11) sampling rate.
To use this library:
- Download the zip from specified version: https://github.com/winlinvip/SimpleDHT/releases
- Import to Arduino: Arduino => Sketch => Include Library => Add .ZIP Library...
- Open example: Arduino => File => Examples => SimpleDHT => DHT11Default
- Connect the DHT11 and Upload program to Arduino.
- Open the Serial Window of Arduino IDE, we got the result as following.
=================================
Sample DHT11...
Sample OK: 19 *C, 31 H
=================================
Sample DHT11...
Sample OK: 19 *C, 31 H
=================================
Remark: For DHT11, no more than 1 Hz sampling rate (once every second).
Remark: For DHT22, no more than 0.5 Hz sampling rate (once every 2 seconds).
- DHT11, The product, datasheet and example, 1HZ sampling rate.
- DHT22, The product, datasheet and example, 0.5Hz sampling rate.
This library including the following examples:
- DHT11Default: Use DHT11 to sample.
- DHT11WithRawBits: Use DHT11 to sample and get the 40bits RAW data.
- DHT11ErrCount: Use DHT11 to sample and stat the success rate.
- DHT22Default: Use DHT22 to sample.
- DHT22WithRawBits: Use DHT22 to sample and get the 40bits RAW data.
- DHT22Integer: Use DHT22 to sample and ignore the fractional data.
- DHT22ErrCount: Use DHT22 to sample and stat the success rate.
- TwoSensorsDefault: Use two DHT11 to sample.
- adafruit/DHT-sensor-library
- Arduino #4469: Add SimpleDHT library.
- DHT11 datasheet and protocol.
- DHT22 datasheet and protoocl.
Winlin 2016.1