How to use 16×2 LCD display with Arduino

how to use 16x2 lcd display with arduino Arduino project with code and circuit diagram
How to use 16x2 lcd display with Arduino. Arduino project with code and circuit diagram

The 16×2 LCD display is an electronic device that is used to display messages and data such as measurements, words, symbols, and more.
In a 16×2 LCD display, the term LCD stands for Liquid Crystal Display. It’s used in an extensive range of applications, like various circuits and devices, like mobile phones, calculators, computers, TV, and others.
In this post, we’ll discover how to use 16×2 LCD display with Arduino, step by step.

Electronic components that we need:

  • LCD display 16×2
  • variable resistor (Potentiometer 5k Ohm)
  • 1 resistor (220 Ohm)
  • Electrical wires
  • Arduino UNO
  • Breadboard

Circuit diagram:

Arduino Programming Code:

// 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 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
// by www.andprof.com
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Hello, World!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// Print a message to the LCD.
lcd.print("www.AndProf.com");

}

Explanatory Video:

how to use 16×2 lcd display with arduino | Arduino project with code and circuit diagram

Previous articleHow to use digit 7-segment LED display with Arduino
Next articleHow to use sound sensor with Arduino