Arduino LCD Example

The following is an example of an Arduino setup with an LCD.  It’s the “hello world” of LCD examples.  The base of this example was taken from the LCD sketch example that ships with the Arduino IDE.

Bread Board Layout


Schematic Layout


Arduino Sketch

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

// initialize the library with the numbers of the interface pins
 LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
 // set up the LCD's number of columns and rows:
 // This particular 16x1 LCD is treated as an 8x2.  8 Characters by 2 rows.
 lcd.begin(8, 2);

void loop() {
 lcd.print("hello, w");
 lcd.setCursor(0, 1);
 lcd.print("orld! ");