Skip to content
FLAVIO COPES
flaviocopes.com
2026

Arduino project: build a digital thermometer

By Flavio Copes

Learn how to build an Arduino digital thermometer by combining a DHT11 temperature and humidity sensor with a 1602 LCD display to show live readings.

~~~

In this project I want to combine 2 components, the 1602 LCD Display

Two 1602 LCD displays showing front and back sides with blue screen and green PCB with pin connections

and the DHT11 temperature and humidity sensor

DHT11 temperature and humidity sensor module with blue plastic casing and pin labels on black PCB

to create a digital thermometer we could actually use in the real world.

Before we start, read the DHT11 tutorial where we write a program that reads the data from the sensor:

Arduino circuit diagram showing DHT11 temperature sensor connected to Arduino Uno with wiring schematic

and also read the 1602 LCD tutorial where I explain how to write to the display:

Arduino circuit diagram showing 1602 LCD display connected to Arduino Uno via breadboard with Hello World displayed

Once you do so, all you need to do from the circuits perspective is to add both circuits to the same Arduino based project:

Complete circuit diagram showing Arduino connected to both DHT11 sensor and 1602 LCD display via breadboard

Here it is in practice:

Physical breadboard setup with Arduino Uno, 1602 LCD display, and colorful jumper wires connecting components

Arduino project from different angle showing LCD display, breadboard, and DHT11 sensor with wire connections

Top-down view of completed digital thermometer project with LCD display, Arduino, and DHT11 sensor on breadboard

On the code side, we do a similar thing. We include both the DHT and the LiquidCrystal libraries first, then we initialize the 2 components.

We initialize them in setup() and in loop() we check every 2 seconds the data coming from the sensor, and we print it to the LCD display:

#include <LiquidCrystal.h>
#include <DHT.h>

DHT dht(2, DHT11);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

void setup() {
  dht.begin();
  lcd.begin(16, 2);
}

void loop() {
  delay(2000);
  float h = dht.readHumidity();
  float t = dht.readTemperature();

  if (isnan(h) || isnan(t)) {
    return;
  }

  lcd.setCursor(0, 0);
  lcd.print((String)"Temp: " + t + "C");
  lcd.setCursor(0, 1);
  lcd.print((String)"Humidity: " + h + "%");
}

Here is the project running:

LCD display showing live temperature and humidity readings - Temp: 19.1C and Humidity: 69.60% on blue screen

Tagged: Arduino ยท All topics
~~~

Related posts about electronics: