LiquidCrystal GPIO map

Match LiquidCrystal RS, E, and D4–D7 pins to your Arduino sketch constructor so the LCD lights up instead of staying blank.

Top view of a blue Arduino Uno microcontroller board on a white background
Arduino-compatible boards run the sketch that polls probes and publishes JSON. Photo: Wikimedia Commons contributor. CC0

The 16×2 LCD uses parallel mode in 4-bit wiring: RS, E, and four data lines map to specific Uno GPIOs matching the LiquidCrystal constructor in firmware. Backlight may be on a transistor switch for dimming or power saving.

Typical assignments

Exact pins follow the repo sketch: document your build on paper. RS and E control command versus data mode; D4–D7 carry nibbles. Contrast on Vo uses a 10k pot between 5 V and ground.

  • RS: Register select: commands vs character data.
  • E: Enable strobe for each nibble transfer.
  • D4–D7: Upper four bits of the 8-bit interface in 4-bit mode.
  • Backlight: Often transistor-switched LED+ pin, not a GPIO data line.

Avoiding conflicts

Do not assign LCD lines to SPI reserved pins used by the Ethernet shield. DHT22 data pins must also stay clear: see DHT22 data wiring.

Display content

What appears on each row is firmware-defined in LCD local display format.