DHT22 with Arduino and adafruit DHT library



Arduino Uno with Breadboard wired up to read output from DHT22 and write it to the Arduino Serial Monitor

The code and library I used is here at Adafruit DHT22 link. It all works seamlessly if you follow the instructions exactly. The default sensor in the code is DHT22. I tried other libraries and code, but this is the only one that worked first try!

breadboard image with DHT22

Fritzing diagram of DHT22 wiring


Clarification on wire routing for first image:

Diagram #           Route

   1            between DHTpin2 and first resistor leg inline with DHTpin2
   2            from DHTpin 4 to bb neg or Arduino gnd
   3            (one leg of resistor) inline with DHTpin2
   4            (other leg of resistor) inline with DHTpin2
   5            inline with DHTpin2 to bb+ (completes signal line)
   6            from DHTpin1 to bb+
   7            from bb neg to Arduino gnd 
                (can do without and connect DHTpin4 directly to Arduino Ground)
   8            from bb+ to Arduino 3.3v

Below is copy from the Arduino Serial Monitor output from the DHT22

DHT22 test!
Humidity: 22.10 %	Temperature: 23.10 *C 73.58 *F	Heat index: 22.04 *C 71.68 *F
Humidity: 22.00 %	Temperature: 23.20 *C 73.76 *F	Heat index: 22.15 *C 71.87 *F
Humidity: 22.00 %	Temperature: 23.20 *C 73.76 *F	Heat index: 22.15 *C 71.87 *F
Humidity: 21.90 %	Temperature: 23.20 *C 73.76 *F	Heat index: 22.15 *C 71.87 *F
Humidity: 75.80 %	Temperature: 23.60 *C 74.48 *F	Heat index: 23.99 *C 75.19 *F  << I breathed on the sensor
Humidity: 70.00 %	Temperature: 23.40 *C 74.12 *F	Heat index: 23.62 *C 74.52 *F
Humidity: 50.70 %	Temperature: 23.30 *C 73.94 *F	Heat index: 23.01 *C 73.42 *F
Humidity: 36.10 %	Temperature: 23.20 *C 73.76 *F	Heat index: 22.52 *C 72.53 *F
Humidity: 28.60 %	Temperature: 23.20 *C 73.76 *F	Heat index: 22.32 *C 72.18 *F
Humidity: 25.30 %	Temperature: 23.20 *C 73.76 *F	Heat index: 22.24 *C 72.03 *F
Humidity: 24.30 %	Temperature: 23.30 *C 73.94 *F	Heat index: 22.32 *C 72.18 *F
Humidity: 23.70 %	Temperature: 23.20 *C 73.76 *F	Heat index: 22.19 *C 71.95 *F
Humidity: 23.40 %	Temperature: 23.20 *C 73.76 *F	Heat index: 22.19 *C 71.94 *F
Humidity: 23.30 %	Temperature: 23.30 *C 73.94 *F	Heat index: 22.29 *C 72.13 *F