Arduino

Buy | Download | Getting Started | Learning | Reference | Hardware | FAQ

Blog » | Forum » | Playground »

Reference Language (extended) | Libraries | Comparison | Board

LiquidCrystal

## LiquidCrystal()

#### Description

Creates a variable of type LiquidCrystal.

#### Syntax

LiquidCrystal(rs, rw, enable, d0, d1, d2, d3)
LiquidCrystal(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7)

#### Parameters

rs: the number of the Arduino pin that is connected to the RS pin on the LCD

rw: the number of the Arduino pin that is connected to the RW pin on the LCD

enable: the number of the Arduino pin that is connected to the enable pin on the LCD

d0, d1, d2, d3, d4, d5, d6, d7: the numbers of the Arduino pins that are connected to the corresponding data pins on the LCD. d4, d5, d6, and d7 are optional; if omitted, the LCD will be controlled using only four data lines.

#### Example

    #include <LiquidCrystal.h>

    LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

    void setup()
    {
      lcd.print("hello, world!");
    }

    void loop() {}

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Edit Page | Page History | Printable View | All Recent Site Changes