Reference

Last revision 2026/01/17

Function Explanation

LiquidCrystal(rs, enable, d4, d5, d6, d7)

Creates a variable of type LiquidCrystal. The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines unconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; if so, omit it from this function's parameters. for example:

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

lcd.begin(cols, rows)

Initializes the interface to the LCD screen, and specifies the dimensions (width and height) of the display. begin() needs to be called before any other LCD library commands.for example:

lcd.begin(16, 2);

lcd.setCursor(col,row)

Set the location at which subsequent text written to the LCD will be displayed. for example:

lcd.setCursor(0,0);

lcd.print(data)

Prints text to the LCD.for example:

lcd.print("hello, world!");

lcd.write(data)

Write a character to the LCD.

FAQ

Why my LCD keypad cannot display anything on the Intel Edison while all right on Romeo?

It works well if uploaded by Arduino 1.5.3 version, however, the latest 1.6.* have discard pin Definition for Edison. So you have to add pinMode(); into the setup() like this:

void setup() {
  for(int i=4;i<10;i++){
  pinMode(i,OUTPUT);
  }
  lcd.begin(16, 2);  // set up the LCD's number of columns and rows
}

lcdkepad

Was this article helpful?

ON THIS PAGE

TOP