DHT-22 (also known by RHT03) is a low cost humidity and temperature sensor with a single wire digital interface. The sensor is calibrated and doesn’t require extra components so you can get right to measuring relative humidity and temperature. DHT22 is more accurate and has more dynamic range than DHT11 sesnors.
Connection with Arduino
First we need to included the DHT library which can be found from the Arduino official website, then define the pin number to which our sensor is connected and create a DHT object. In the setup section we need to initiate the serial communication because we will use the serial monitor to print the results. Using the read22() function we will read the data from the sensor and put the values of the temperature and the humidity into the t and h variables. If you use the DHT11 sensor you will need to you the read11() function. At the end we will print the temperature and the humidity values on the serial monitor.
Related Articles DHT11 Temperature & Humidity sensor Module Raspberry Pi Starter Kit Lesson 17: Raspberry Pi Works with DHT11 Temperature and Humidity Module How to Set up Temperature and Humidity Sensor (DHT11) on Raspberry Pi Drive DHT11 Temperature Sensor with Raspberry Pi
DownLoad Url osoyoo.com