HUMIDITY SENSOR DHT22


The pin configuration of the sensor is:
Pin1- +5V
Pin2- Data
Pin3- NULL
Pin4- GND
You need to add an extra resistor of 4k7 between the data pin and the positive supply pin.
After physically connecting the Digital pin 2 of Arduino with the Sensor, you need to add the DHT22 library in the Arduino Software.
Follow the steps to add a library in the ARDUINO Sketch:
1. Download the DHT22 library from the link given below.
2. Extract the files from the DHT22.zip
3. Copy the complete DHT22 folder and paste it to ..\Arduino\libraries\
4. Now in order to check whether the library has been added, open the arduino window. Then click on the Sketch Tab and then on the Import Library. The DHT22 library will be shown on the top. This confirm that the library has been added successfully to software
Now copy the code found in download link below DHT22.txt to the Arduino IDE.
Compile and Upload the program. Then open the serial Monitor .
The Temperature and Humidity will be shown. DHT22.txt
DHT22 LIBRARY