DEV Community

張旭豐
張旭豐

Posted on

5 LCD I2C Display Projects That Make Data Beautiful

5 LCD I2C Display Projects That Make Data Beautiful

Build visual dashboards: weather station, cooking timer, plant monitor, retro clock, and robot status display

Hero

The LCD and related sensors power some of the most practical Arduino projects. In this guide, we build five LCD-based projects that solve real problems.


What You'll Need

  • 16×2 LCD I2C Display
  • Arduino Nano
  • DHT22 Sensor
  • DS3231 RTC
  • Potentiometer

How It Works

// WF1 Run #043 - Basic LCD I2C
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  lcd.begin();
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("Hello World!");
  lcd.setCursor(0, 1);
  lcd.print("Arduino LCD");
}

void loop() {}
Enter fullscreen mode Exit fullscreen mode

Project 1: Weather Dashboard

Goal: Display temperature and humidity with automatic updates

Weather Dashboard

Hardware

DHT22, Arduino Nano, 16×2 LCD I2C, USB power

Code

void loop() {
  float t = dht.readTemperature();
  float h = dht.readHumidity();
  lcd.clear();
  lcd.setCursor(0, 0); lcd.print("Temp: "); lcd.print(t, 1);
  lcd.setCursor(0, 1); lcd.print("Hum: "); lcd.print(h, 1);
  delay(2000);
}
Enter fullscreen mode Exit fullscreen mode

Project 2: Kitchen Countdown Timer

Goal: Count down cooking time with buzzer alarm

Kitchen Countdown Timer

Hardware

Arduino Nano, 16×2 LCD, Rotary encoder, Buzzer

Code

int minutes = 0;
void setup() { lcd.begin(); lcd.print("Timer: 0:00"); }
void loop() {
  // Rotary encoder adjusts minutes
  lcd.setCursor(0, 0);
  lcd.print("Timer: ");
  lcd.print(minutes);
  lcd.print(":00");
}
Enter fullscreen mode Exit fullscreen mode

Project 3: Plant Health Monitor

Goal: Show soil moisture, light level, days since watering

Plant Health Monitor

Hardware

Arduino Nano, 16×2 LCD, Soil sensor, Photoresistor

Code

void loop() {
  int soil = analogRead(A0);
  int light = analogRead(A1);
  lcd.clear();
  lcd.setCursor(0, 0); lcd.print("Soil:"); lcd.print(soil);
  lcd.setCursor(0, 1); lcd.print("Light:"); lcd.print(light);
  delay(1000);
}
Enter fullscreen mode Exit fullscreen mode

Project 4: Retro Word Clock

Goal: Show time in word format on LCD

Retro Word Clock

Hardware

Arduino Nano, DS3231 RTC, 16×2 LCD

Code

void loop() {
  DateTime now = rtc.now();
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("IT IS ");
  lcd.print(now.hour());
  lcd.print(" OCLOCK");
  delay(1000);
}
Enter fullscreen mode Exit fullscreen mode

Project 5: Robot Status Display

Goal: Show battery level, sensor readings, and motor state

Robot Status Display

Hardware

Arduino Mega, 16×2 LCD, Voltage divider, IR sensors

Code

void loop() {
  int battery = analogRead(A0);
  lcd.clear();
  lcd.setCursor(0, 0); lcd.print("Bat:"); lcd.print(battery);
  lcd.setCursor(0, 1); lcd.print("Status: OK");
  delay(500);
}
Enter fullscreen mode Exit fullscreen mode

Troubleshooting

Problem Cause Fix
LCD shows nothing Backlight off Call lcd.backlight() after lcd.begin()
Garbled characters I2C address wrong Scan I2C bus: common addresses 0x27, 0x3F
Cursor invisible Cursor not enabled Use lcd.cursor() or lcd.blink()

Start Here

Affiliate disclosure: As an Amazon Associate, I earn from qualifying purchases.

16×2 LCD I2C
Arduino Nano
DHT22 Sensor
DS3231 RTC


Next Step: From Scene to Sensor, Without Writing Code

If this guide gave you ideas for your own setup — I can help you map that out.

I offer a personalized interactive device design guide at Fiverr:

👉 https://www.fiverr.com/phd_hfchang/generate-an-arduino-interactive-prototypef

Tags: Arduino LCD I2C Display Weather Station Timer

Top comments (0)