Humidity & Temperature Wide Detection Range Sensor Module DHT22
-
RM18.00
- Product Code: Humidity Sensor Module DHT22
- Availability: In Stock
The DHT-22 (also known by AM2302) is a digital temperature and humidity sensor module that works with all of the Arduino micro-controllers. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analog input pins needed). Its fairly simple to use, but requires careful timing to grab data. The only real downside of this sensor is you can only get new data from it once every 2 seconds, so when using our library, sensor readings can be up to 2 seconds old.
Simply connect the red 3-5V power, the yellow wire to your data input pin and the black wire to ground. Although it uses a single-wire to send data it is not Dallas One Wire compatible! If you want multiple sensors, each one must have its own data pin!
Features:
Specifications:
You can download the Library we used here: DHT_Library.zip
Arduino Sketch:
#include <DHT.h> #define dht_apin A0 // Analog Pin sensor is connected to dht DHT; void setup(){ Serial.begin(9600); delay(500); //Delay to let system boot Serial.println("DHT11 Humidity & temperature Sensor\n\n"); delay(1000); //Wait before accessing Sensor } void loop(){ //Start of Program DHT.read11(dht_apin); Serial.print("Current humidity = "); Serial.print(DHT.humidity); Serial.print("% "); Serial.print("temperature = "); Serial.print(DHT.temperature); Serial.println("C "); delay(5000); //Wait 5 seconds before accessing sensor again. //Fastest should be once every two seconds. }