Home › Lessons › Embedded (ESP32) › 16×2 I²C LCD

16×2 I²C LCD

Embedded (ESP32) · Intermediate · about 20 minutes · part of Zen’s Electronics Design Mastery

Show text and numbers on a character LCD over I²C. Here a 12 V adapter feeds an HW-688 for 5 V, the ESP32 reads a pot and prints the value with a custom character.

16×2 I²C LCD: the circuit on the simulator's bench

Open this lesson in the labFree, in your browser, no account needed.

How it works

lcd.setCursor(col, row) then lcd.print(). Two rows of 16 characters, each 5 × 8 dots; createChar() defines up to 8 of your own (the lightning bolt here).

Try it on the bench

  1. Turn the pot: the number on the LCD follows.
  2. Edit the sketch to print your name on row 0.

Parts on the bench

In the course

Zen’s Electronics Design Mastery, module “Microcontrollers & Embedded”.

More on embedded (esp32)