03 / Templates · intermediate
LCD 1602 HELLO WORLD
Open in PlaygroundDisplays '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
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);
}
- wokwi-arduino-uno01
- wokwi-lcd160202
| Component Pin | Arduino Pin |
|---|---|
| RS | Pin 12 |
| RW | GND |
| E (Enable) | Pin 11 |
| D4 | Pin 5 |
| D5 | Pin 4 |
| D6 | Pin 3 |
| D7 | Pin 2 |
| VSS, V0, RW, K | GND |
| VDD, A (via 220 Ω) | 5V |