Fiverr gig
$15 — I will help you with your project and simulate it for you
Hire me
🤖 Arduino Projects

16x2 LCD Arduino — Wiring, LiquidCrystal Code & Proteus

The Engineer PostMay 29, 20265 min read
16x2 LCD display wired to Arduino Uno in 4-bit mode showing Hello World

Wiring a 16x2 LCD Arduino display is the fastest way to give an Arduino project a real user interface. In this tutorial we wire an HD44780 16x2 LCD to Arduino Uno in 4-bit mode, use the built-in LiquidCrystal library, and simulate the circuit in Proteus before you solder anything.

Welcome to this beginner-friendly Arduino tutorial on the 16x2 lcd. By the end of the guide, you'll wire the module to an Arduino UNO, flash a short sketch, and read live values on the Serial Monitor — no prior electronics experience required.

Need this built for you? I do custom Arduino, ESP32 and Proteus projects from $15.

What you'll learn

  • How the module works in plain language
  • The exact parts you need and how to wire them safely
  • The full Arduino IDE sketch with comments
  • Common issues and how to fix them
[Interfacing 16x2 LCD with Arduino](https://circuitdigest.com/microcontroller-projects/interfacing-16x2-lcd-with-arduino) — overview
[Interfacing 16x2 LCD with Arduino](https://circuitdigest.com/microcontroller-projects/interfacing-16x2-lcd-with-arduino) — wiring diagram

Arduino code

Open the Arduino IDE, paste the sketch below into a new file, install any libraries the sketch #includes (Tools → Manage Libraries), select your board and COM port, then click Upload.

// include the library code:
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 2, d5 = 3, d6 = 4, d7 = 5;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print(" Circuit Digest!");
  delay(2000);
  for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
    // scroll one position right:
    lcd.scrollDisplayRight();
    // wait a bit:
    delay(150);
  }
  lcd.clear();
  lcd.setCursor(6, 0);
  lcd.print("Count!");
  // print the number of seconds since reset:
}

void loop() {
  for (int i = 0; i < 10; i ++)
  {
    lcd.setCursor(8, 1);
    // print the number of seconds since reset:
    lcd.print(i); 
    delay(1000);
  }
}
[Interfacing 16x2 LCD with Arduino](https://circuitdigest.com/microcontroller-projects/interfacing-16x2-lcd-with-arduino) — reference image
[Interfacing 16x2 LCD with Arduino](https://circuitdigest.com/microcontroller-projects/interfacing-16x2-lcd-with-arduino) — reference image
[Interfacing 16x2 LCD with Arduino](https://circuitdigest.com/microcontroller-projects/interfacing-16x2-lcd-with-arduino) — reference image
[Interfacing 16x2 LCD with Arduino](https://circuitdigest.com/microcontroller-projects/interfacing-16x2-lcd-with-arduino) — reference image

How it works

The sketch initialises serial communication and the 16x2 lcd driver in setup(), then in loop() it samples the sensor at a regular interval and prints the result to the Serial Monitor at 9600 baud. Open the Serial Monitor (Ctrl+Shift+M) after upload to see live readings.

Troubleshooting checklist

  • No readings: verify the baud rate in Serial Monitor matches the sketch (usually 9600).
  • Garbage characters: wrong baud rate or loose GND wire.
  • Library not found: install the exact library referenced in the #include line via Library Manager.
  • Sensor not detected (I²C): run an I²C scanner sketch to confirm the address.

What to build next

Once the basic readout works, try logging values to an SD card, sending them over Wi-Fi with an ESP32, or pushing them to a Blynk IoT dashboard. Pair this module with our simulator round-up to prototype the circuit before soldering.

Stuck on your own build? Send me your Arduino / ESP32 / Proteus project on Fiverr — from $15, you don't pay if it doesn't work.

Frequently Asked Questions

Q.What library do I need for the 16x2 lcd?

Open Arduino IDE → Tools → Manage Libraries, then search for any library named in the sketch's #include lines and install the latest version.

Q.Why does the Serial Monitor show nothing?

The most common cause is a baud-rate mismatch — set the Serial Monitor to 9600 baud (bottom-right dropdown) so it matches Serial.begin(9600) in the code.

Q.Can I use this with an ESP32 instead of Arduino UNO?

Yes. The 16x2 lcd works with any 3.3-5 V microcontroller. Just remap the wiring to ESP32 I/O pins and keep the rest of the sketch the same.

TEP

The Engineer Post

Embedded systems engineer and educator. Writes weekly tutorials at EmbedLab to help beginners ship real hardware.

Related projects

Browse all 50+ projects