DHT 22 is low cost temperature and humidity sensor. This sensor has more accuracy compared to previous version (DHT 11). See the comparison here. My DHT 22 comes with in breakout board, so there is no need to add additional resistor to drop the voltage. This sensor has 3 pins.
Install DHT Sensor Library.
Above photo shows DHT 22 compared to GY BMP 280. The pins out is easy.
DHT 22 (From left to right)
- VCC
- Output
- GND
Connecting sensor to Arduino also easy.
- VCC <-----> Arduino 5V----->
- Output <-----> Digital Pin 2----->
- GND <------> Arduino GND------>
Connect Arduino with computer and run Arduino IDE. Install Adafruit DHT sensor library from Libraries Manager.
Install Adafruit Unified Sensor.
Install Adafruit Unified Sensor.
Install DHT Sensor Library.
Download test sketch from my github : https://github.com/satujamsaja/Arduino/tree/master/dht22
and run the sketch.
Here is the result:
Good luck.
Comments