Skip to content

I2C LCD Hello World

Drive an LCD through a modeled PCF8574 backpack using only SDA and SCL.

I2C LCD Hello World: the matching Arduino Uno circuit rendered in Circuitera’s simulator
Matching Circuitera simulator circuit. Real firmware capture; modeled components are idealized.

Wire it up

Disconnect power before changing connections. Follow terminal names rather than wire colors.

FromToWhy it matters
I²C LCD 16×2 (lcd1) · GNDUno · GND.1Ground reference
I²C LCD 16×2 (lcd1) · VCCUno · 5VPower connection
I²C LCD 16×2 (lcd1) · SDAUno · A4Match this terminal to the sketch
I²C LCD 16×2 (lcd1) · SCLUno · A5Match this terminal to the sketch

The complete sketch

i2c-lcd-hello.ino
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
  lcd.init(); lcd.backlight();
  lcd.print("Hello Circuitera");
  lcd.setCursor(0, 1); lcd.print("I2C at 0x27");
}
void loop() {}

The launch buttons use this same code and a matching saved circuit.

Build it step by step

  1. Open a complete project

    Launch in Simulator creates a separate Uno sketch and its matching wired circuit. Existing sketches are preserved. Press Run to compile and execute.

  2. Explore the live circuit

    Run and compare its four external wires with the parallel LCD project.

  3. Try it on hardware

    Disconnect power while wiring. Match terminal names in the table, select the exact board, Verify, then connect and upload. Check component ratings and power requirements first.

Understand the sketch

Address and backpack mapping

The project uses address 0x27 and the simulator’s P0 RS / P1 RW / P2 E / P3 backlight / P4–7 data mapping. Other backpacks may use a different address or mapping.

If something is different

Nothing displays

Keep the inspector address at 39 decimal (0x27), use A4 for SDA and A5 for SCL, and check the physical backpack mapping.

Expected output and tested scope

The modeled I2C backpack drives Hello Circuitera onto the character display.

Version 1 · Last source- and build-matched test: 2026-10-25. Actual shipped AVR-GCC WASM compilation and Uno AVR engine execution; no physical hardware test.

Supported tutorial target: Arduino Uno R3 / ATmega328P. Compile: PASS · Modeled execution: PASS. Other boards require a separate review of pins, voltage, libraries and the exact build profile.

Keep exploring.