DIYmall DHT11 Temperature Sensor 1602 IIC LCD with Arduino

What you need:
1 X DHT11 Temperature Sensor
1 X 1602 IIC LCD Display Module
1 X Arduino UNO
1 X 7P Female to Male Jump Wire
1 X USB Cable

DHT 11 to UNO R3:
S to D2
+ to 3V3
– to GND

1602 LCD to UNO R3:
VCC to 5V
SDA to A4
SCL to A5

Download below two libraries on your Arduino IDE:
DHT sensor library
LiquidCrystal I2C

Install DHT sensor library in your Arduino IDE

Install library of LiquidCrystal I2C in your Arduino IDE

Code example:
#include <LiquidCrystal_I2C.h>
#include “DHT.h”
#define DHTPIN 2
#define DHTTYPE DHT11

LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C address 0x3F, 16 column and 2 rows

void setup()
dht.begin(); // initialize the sensor
lcd.init(); // initialize the lcd
lcd.backlight(); // open the backlight

void loop()
delay(2000); // wait a few seconds between measurements

float humi = dht.readHumidity(); // read humidity
float tempC = dht.readTemperature(); // read temperature

// check if any reads failed
if (isnan(humi) || isnan(tempC)) {
lcd.setCursor(0, 0);
} else {
lcd.setCursor(0, 0); // start to print at the first row
lcd.print(“Temp: “);
lcd.print(tempC); // print the temperature
lcd.print((char)223); // print ° character

lcd.setCursor(0, 1); // start to print at the second row
lcd.print(“Humi: “);
lcd.print(humi); // print the humidity

After upload the code, the measurement of the temperature and humidity results displayed in 1602 LCD like below picture:


Purchase link: