In these tutorials, we will measure Temperature and Humidity by using DHT11 with Arduino. Here we also display those readings on an LCD Display.
The DHT11 Temperature and Humidity Sensor senses, measures and regularly reports the relative humidity in the air. It measures both moisture and air temperature. The warmer the air is, the more moisture it can hold, so relative humidity changes with fluctuations in the temperature.
Humidity sensors detect the relative humidity of immediate environments in which they are placed. They measure both moisture and temperature in the air and express relative humidity as a percentage of the ratio of moisture in the air to the maximum amount that can be held in the air at the current temperature. As the air becomes hotter, it holds more moisture, so the relative humidity changes with the temperature.
Pin Connection of DHT11
Circuit Diagram of DHT11 with Arduino
With the help of the below circuit diagram connect the sensor and Arduino.
DHT11 Library For Below Code
You need to install the below DHT11 library. Just download the below library and open Arduino IDE. Now go to Sketch > Include Library > Add .Zip Library.
Code for DHT11 with Arduino
After installing the DHT11 Library, upload the below code on the Arduino board.
Library Used in Below Code
These libraries are used to display some additional about the sensor like its DHT11 or DHT22 and used for the below code.
Now we will display the temperature and humidity readings on the LCD 16×2 display. For this, following the circuit diagram given below, connect the sensor, LCD with the Arduino.
Circuit Diagram of DHT11 and LCD with Arduino
Code for DHT11, LCD with Arduino
Here some more tutorials for you: