Reads the room temperature and shows it live on an LCD.
Built and tested by Shahan Fathima K · Industrial Robotics Institute

A simple digital thermometer. A DHT11 sensor measures the surrounding temperature, and the Arduino shows it on a 16×2 I2C LCD, updating every 2 seconds. If the sensor can’t be read, the screen shows "Error".
| Component | Qty |
|---|---|
| Arduino Uno | 1 |
| DHT11 Temperature & Humidity Sensor | 1 |
| 16×2 LCD with I2C Module | 1 |
| Jumper Wires | As needed |
| From | Connect to |
|---|---|
| DHT11 VCC | 5V |
| DHT11 GND | GND |
| DHT11 DATA | Pin 2 |
| LCD VCC | 5V |
| LCD GND | GND |
| LCD SDA | A4 |
| LCD SCL | A5 |
Complete, tested Arduino C++ code for this project. Copy it into Arduino IDE and upload it to the Arduino Uno.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DHT.h>
#define DHTPIN 2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
lcd.init(); // some library versions use lcd.begin()
lcd.backlight();
dht.begin();
lcd.setCursor(0, 0);
lcd.print("Digital Thermo");
delay(2000);
lcd.clear();
}
void loop()
{
float temp = dht.readTemperature();
lcd.setCursor(0, 0);
lcd.print("Temp: ");
if (isnan(temp))
{
lcd.print("Error");
}
else
{
lcd.print(temp);
lcd.print(" C");
}
delay(2000);
}A simple digital thermometer. A DHT11 sensor measures the surrounding temperature, and the Arduino shows it on a 16×2 I2C LCD, updating every 2 seconds.
You need: Arduino Uno (1), DHT11 Temperature & Humidity Sensor (1), 16×2 LCD with I2C Module (1), Jumper Wires. Software: Arduino IDE, DHT sensor library, LiquidCrystal_I2C library.
Yes. It is rated beginner and takes about 1–2 hours to build, using the Arduino Uno. The guide on this page explains every connection and step.
The complete, tested Arduino C++ code is free on this page. Copy it into Arduino IDE and upload it to the board.
Yes. IRI sells a kit with the parts for this project (PRJ-035). Message IRI on WhatsApp at +91 86060 82634 for the kit price and delivery details.