Until now you needed the Serial Monitor to see what your UNO was doing. The 1602 LCD changes that: it shows two lines of 16 characters right on your desk. In this lesson you connect it, print a message and a running timer, and design your own small picture to show on the screen.
What you'll learn
- How to connect a character LCD in 4-bit mode
- How to print text and numbers with the LiquidCrystal library
- How to place the cursor on a line and column
- How to make your own characters with
createChar()
What you need
- UNO R3 board and USB cable (UNO R3 Starter Kit)
- 1602 LCD display (UNO R3 Starter Kit)
- 10 kΩ potentiometer (UNO R3 Starter Kit)
- 1 resistor, 220 Ω (UNO R3 Starter Kit)
- Breadboard and jumper wires (UNO R3 Starter Kit)
Before you start
The LCD has 16 connections in a row. If yours has no pins, solder 16 pins from the 40-pin male header in the kit first, so it plugs into the breadboard. Ask an adult to help if you're new to soldering.
Wiring

| From | To |
|---|---|
| LCD VSS, RW and K | GND |
| LCD VDD | 5V |
| LCD V0 | Middle pin (W) of the potentiometer |
| LCD RS | UNO pin 12 |
| LCD E | UNO pin 11 |
| LCD D4, D5, D6, D7 | UNO pins 5, 4, 3, 2 |
| LCD D0 to D3 | Not connected |
| LCD A (backlight +) | 220 Ω resistor, then 5V |
| Potentiometer outer pins | 5V and GND |
Use the breadboard's + and − rails for every 5V and GND connection.
The sketch
The LiquidCrystal library is built into the Arduino IDE, so there is nothing to install.
#include <LiquidCrystal.h>
// LCD pins: RS, E, D4, D5, D6, D7
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// A smiley, drawn as 8 rows of 5 pixels (1 = pixel on)
byte smiley[8] = {
0b00000,
0b01010,
0b01010,
0b00000,
0b10001,
0b01110,
0b00000,
0b00000
};
void setup() {
lcd.begin(16, 2); // 16 columns, 2 rows
lcd.createChar(0, smiley);
lcd.print("Hello, maker!");
lcd.write(byte(0)); // show the smiley
}
void loop() {
lcd.setCursor(0, 1); // column 0, row 1 (the second line)
lcd.print("Time: ");
lcd.print(millis() / 1000);
lcd.print(" s "); // spaces wipe out old digits
delay(200);
}
Upload the sketch, then slowly turn the potentiometer until the text is sharp and clear.
How it works
The LCD needs to know two things for every character: what to show and when to read it. In 4-bit mode the UNO sends each character in two halves over D4 to D7, which saves four pins. RS tells the screen whether the data is text or a command (such as "clear" or "move the cursor"), and E is the signal to read. The potentiometer sets the voltage on V0, which controls the contrast.
setCursor(column, row) counts from 0, so (0, 1) is the start of the second line. The screen keeps whatever you printed until you overwrite it, which is why the timer line ends with spaces: when the number gets shorter, the spaces cover the old digits. The LCD can store up to eight characters of your own design; each one is 5 pixels wide and 8 tall.
Try this next
- Make the message scroll with
lcd.scrollDisplayLeft(). - Draw a heart and a battery symbol as extra custom characters.
- Show the distance from the ultrasonic sensor lesson on the screen.
Troubleshooting
- The screen lights up but shows only blocks or nothing: turn the potentiometer slowly from one end to the other.
- Only the top row shows blocks: the LCD is powered but gets no data. Check RS, E and D4 to D7.
- Strange characters: two of the data wires D4 to D7 are swapped.
- No backlight: check the 220 Ω resistor on A and the GND wire on K.