CNAP
03 / Templates · intermediate

LCD 1602 HELLO WORLD

Open in Playground

Displays 'Hello, World!' on row 1 and a live uptime counter on row 2, using the LiquidCrystal library in 4-bit mode. Wire RW and V0 to GND in real hardware.

intermediateLCDdisplayLiquidCrystaltext
Circuit
Code
sketch.inoArduino C++
18 lines
// LCD 1602 — Hello World + uptime counter
#include <LiquidCrystal.h>

// RS, E, D4, D5, D6, D7
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("Hello, World!");
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print("Time: ");
  lcd.print(millis() / 1000);
  lcd.print("s  ");
  delay(500);
}
Components
  • wokwi-arduino-uno
    01
  • wokwi-lcd1602
    02
Wiring
Component PinArduino Pin
RSPin 12
RWGND
E (Enable)Pin 11
D4Pin 5
D5Pin 4
D6Pin 3
D7Pin 2
VSS, V0, RW, KGND
VDD, A (via 220 Ω)5V