LCD 1602 with I2C module
2 rows × 16 characters, only 4 wires
A classic text display with a green or blue backlight. It shows 2 rows of 16 characters. With the small I2C module (PCF8574) on the back you need only 4 wires instead of 16.
Open the course →How it works
The LCD itself has a parallel interface (8 data lines + control). The PCF8574 module is a "translator": it receives I2C commands from the ESP32 and sets those lines. The library sends commands over I2C to address 0x27 (sometimes 0x3F). Whatever you write with lcd.print() stays on the screen until you overwrite it. The blue trimmer on the module is the contrast: if you see only boxes or nothing, turn it.
Pins and wiring
| Pin | What it is | Where it connects / why |
|---|---|---|
| GND | Ground | → GND. |
| VCC | 5 V supply | → VIN (5 V). At 3.3 V the text is almost invisible. |
| SDA | I2C data | → GPIO 21. |
| SCL | I2C clock | → GPIO 22. |
Specifications
Characters16 × 2 (5×8 dots)
Supply5 V, ~20–30 mA with backlight
I2C address0x27 or 0x3F
ModulePCF8574
Contrasttrimmer on the module
Tips and typical mistakes
- Backlight on but no text? Turn the contrast with a small screwdriver.
- Not sure of the address? Run an I2C scanner (Arduino IDE: File → Examples → Wire → WireScan).
- The module has pull-up resistors to 5 V. Most ESP32 boards tolerate it, but the safest way is a level shifter or a 3.3 V LCD version.