In this tutorial, we will learn how to use an LCD 16×2 Display with Arduino. We will use an LCD 16×2 Display.
The full form of LCD Display is Liquid Crystal Display and generally used in many electronics applications.
In Arduino projects to show the sensor readings, status, messages we use LCD Display.
In LCD 16×2 there are 2 lines with 16 characters in each line. Each character is made up of a 5×8 (column x row) pixel matrix.
A potentiometer is also used along with LCD Display for adjusting the brightness of LCD.

Here some more tutorials for you:
- Display Potentiometer Readings on LCD Display
- Ultrasonic Sensor with Arduino
- 7 Segment Display with Arduino
- LDR Sensor with Arduino
- PIR Sensor With Arduino
Components Needed
- LCD 16 x 2 Display
- Arduino Uno
- Potentiometer 10kOhms
- Jumper Wires
- Breadboard
- Resistors
Uses of LCD Display 16×2
- To display customs characters and text.
- To display Status, Messages.
- For display readings of sensors.
LCD Display 16×2 Pin Description Pinout

Pin Connections of LCD 16×2 with Arduino
Pin No. | LCD Pins | Arduino Pins |
---|---|---|
1 | VSS/GND | GND |
2 | VDD/VCC | 5v |
3 | V0 | Potentiometer Vout |
4 | RS | 12 |
5 | RW | GND |
6 | E | 11 |
7-10 | D0-D3 | No connection |
11 | D4 | 5 |
12 | D5 | 4 |
13 | D6 | 3 |
14 | D7 | 2 |
15 | A/LED+ | 5v |
16 | K/LED- | GND |
Circuit Diagram For LCD Display with Arduino

LCD displays have more wires connecting to Arduino than most other recipes we discuss. Incorrect connections are the major cause of problems with LCDs, so take your time wiring things properly and triple check the connection.
An inexpensive multimeter capable of measuring voltages and resistance is a big help for verifying that your wiring is correct.
To save a lot of time and head-scratching only we need the cheapest multimeter to check connections and voltage.
We will need to connect a 10K potentiometer to provide the contrast voltage to LCD pin 3. Without the correct voltage on this pin, you may not see anything displayed. In the figure, one side of the pot connects to ground, the other side connects to Arduino +5V, and the center of the pot goes to LCD pin 3. The LCD is powered by connecting ground and +5V of Arduino to LCD pins 1 and 2.
Code for LCD Display 16×2 Arduino
Output

Turning the Cursor and Display On or Off
Now we want to blink the cursor and turn the display on or off. We may also draw attention to a specific area of the display.
This sketch shows how you can cause the cursor to blink. It also illustrates how to turn the display on and off; for example, to draw attention by blinking the entire display.
The sketch calls blink and noBlink function to toggle cursor blinking on and off.
To blink the entire display there is a function named displayBlink to flash the display for a specified number of times.
The function uses lcd.display() and lcd.noDisplay() to turn the display text on and off (without clearing it from the screen’s internal memory).
Scrolling Text on LCD 16×2 | Long Text
We want to scroll text, for example: to create a marquee that displays more characters that can fit on one line of the LCD display.
This sketch demonstrates both lcd.ScrollDisplayLeft.
This sketch has a marquee function that will scroll text up to 32 characters in length.
The sketch uses the lcd.scrollDisplayLeft function to scroll the display to left when the text is longer than the width of the screen. If we want to scroll the text in right we can use lcd.scrollDisplayRight.
Here some more tutorials for you:
- Display Potentiometer Readings on LCD Display.
- Soil Moisture Sensor With Arduino.
- Interfacing RFID With Arduino.
- Interfacing Thermistor With Arduino.
- IR Receiver and Remote with Arduino.