
Humidity and temperature values are copied to the previous arrays before displaying it. The values of the humidity and temperature needs to be displayed on the LCD after the reading, and for that I used two character arrays named: temperature (char temperature = “Temp = 00.0 C “ ) and humidity (char humidity = “RH = 00.0 % “ ). Since the DHT11 sensor resolution is 1, the values of the humidity and temperature are stored in two variables with type byte (8-bit unsigned), I named them RH (for the humidity) and Temp (for the temperature). This library initiates the DHT11 sensor and reads the values of the humidity and temperature. In this interfacing I used DHT sensors library (DHT11, DHT21 and DHT22) from Adafruit. The 10K variable resistor is used to control the contrast of the LCD screen and the 330 ohm resistor supplies the LCD backlight LED.


A pull-up resistor should be added to the data pin with a value between 4.7K and 10K. As show in the circuit schematic the DHT11 sensor has 4 pins: VCC (+5V), Data, NC(not connected pin) and GND (from left to right).
