Arduino Interfacing with LCD 16x2

The 16x2 LCD is one of the most common displays used in Arduino projects — cheap, easy to wire, and perfect for showing sensor readings, status messages, or menu text without needing a full graphical screen. This post walks through wiring it up and getting your first text on the screen.

Components Needed

  • Arduino Uno (or compatible board)
  • 16x2 LCD module (HD44780-based)
  • 10kΩ Potentiometer (for contrast control)
  • Breadboard
  • Jumper wires

Wiring

  • LCD VCC → Arduino 5V
  • LCD GND → Arduino GND
  • LCD V0 → middle pin of the potentiometer (other two pins go to 5V and GND)
  • LCD RS → Arduino digital pin 12
  • LCD RW → GND
  • LCD E → Arduino digital pin 11
  • LCD D4, D5, D6, D7 → Arduino pins 5, 4, 3, 2

Schematic Diagram

[Re-insert your original wiring diagram image here]

Code: Basic "Hello World"

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("Hello, World!");
}

void loop() {
  // nothing needed here for a static message
}

Bonus: Custom Characters

The LCD can also display custom-drawn symbols using an 8x5 pixel bitmap — useful for icons like a heart, arrow, or battery indicator.

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

byte heart[8] = {
  B00000,
  B01010,
  B11111,
  B11111,
  B01110,
  B00100,
  B00000,
  B00000
};

void setup() {
  lcd.begin(16, 2);
  lcd.createChar(0, heart);
  lcd.write(0);
}

void loop() {
}

Common Issues

  • Blank screen? Adjust the potentiometer — it controls contrast, and it's easy to have it turned too far in either direction.
  • Garbled characters? Double-check D4–D7 wiring order — a single swapped pin will scramble the display.
  • No backlight? Confirm the BL pin is connected to 5V.

Download Code

[Insert your GitHub repo link here]

Watch the Build

[Embed your YouTube video here]

Comments