Adafruit LiquidCrystal Library
Public Member Functions | List of all members
Adafruit_LiquidCrystal Class Reference

Main LiquidCrystal class. More...

#include <Adafruit_LiquidCrystal.h>

Inheritance diagram for Adafruit_LiquidCrystal:

Public Member Functions

 Adafruit_LiquidCrystal (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
 LiquidCrystal constructor for writing to a display. More...
 
 Adafruit_LiquidCrystal (uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
 LiquidCrystal constructor for reading or writing to a display. More...
 
 Adafruit_LiquidCrystal (uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
 LiquidCrystal constructor for reading or writing from a display. More...
 
 Adafruit_LiquidCrystal (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
 LiquidCrystal constructor for only writing to a display. More...
 
 Adafruit_LiquidCrystal (uint8_t i2cAddr, TwoWire *wire=&Wire)
 LiquidCrystal constructor for connection over i2c. More...
 
 Adafruit_LiquidCrystal (uint8_t data, uint8_t clock, uint8_t latch)
 LiquidCrystal constructor for connection over SPI. More...
 
void init (uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
 Initializes the display. More...
 
bool begin (uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)
 Starts I2C connection with display. More...
 
void clear ()
 High-level command to clear the display.
 
void home ()
 High-level command to set the cursor position to zero.
 
void noDisplay ()
 High-level command to turn the display off quickly.
 
void display ()
 High-level command to turn the display on quickly.
 
void noBlink ()
 High-level command to turn the blinking cursor off.
 
void blink ()
 High-level command to turn the blinking cursor on.
 
void noCursor ()
 High-level command to turn the underline cursor off.
 
void cursor ()
 High-level command to turn the underline cursor on.
 
void scrollDisplayLeft ()
 High-level command to scroll display left without changing the RAM.
 
void scrollDisplayRight ()
 High-level command to scroll display right without changing the RAM.
 
void leftToRight ()
 High-level command to make text flow left to right.
 
void rightToLeft ()
 High-level command to make text flow right to left.
 
void autoscroll ()
 High-level command to 'right justify' text from the cursor.
 
void noAutoscroll ()
 High-level command to 'left justify' text from the cursor.
 
void setBacklight (uint8_t value)
 High-level command to set the backlight, only if the LCD backpack is used. More...
 
void createChar (uint8_t, uint8_t[])
 High-level command that creates custom character in CGRAM. More...
 
void setCursor (uint8_t, uint8_t)
 High-level command that sets the location of the cursor. More...
 
virtual void write (uint8_t)
 Mid-level command that sends data to the display. More...
 
void command (uint8_t)
 Sends command to display. More...
 

Detailed Description

Main LiquidCrystal class.

Constructor & Destructor Documentation

◆ Adafruit_LiquidCrystal() [1/6]

Adafruit_LiquidCrystal::Adafruit_LiquidCrystal ( uint8_t  rs,
uint8_t  enable,
uint8_t  d0,
uint8_t  d1,
uint8_t  d2,
uint8_t  d3,
uint8_t  d4,
uint8_t  d5,
uint8_t  d6,
uint8_t  d7 
)

LiquidCrystal constructor for writing to a display.

Parameters
rsThe reset data line
enableThe enable data line
d0The data line 0
d1The data line 1
d2The data line 2
d3The data line 3
d4The data line 4
d5The data line 5
d6The data line 6
d7the data line 7

◆ Adafruit_LiquidCrystal() [2/6]

Adafruit_LiquidCrystal::Adafruit_LiquidCrystal ( uint8_t  rs,
uint8_t  rw,
uint8_t  enable,
uint8_t  d0,
uint8_t  d1,
uint8_t  d2,
uint8_t  d3,
uint8_t  d4,
uint8_t  d5,
uint8_t  d6,
uint8_t  d7 
)

LiquidCrystal constructor for reading or writing to a display.

Parameters
rsThe reset data line
rwThe read write pin. Determines whether to read to or write from display. Not necessary if only writing to display
enableThe enable data line
d0The data line 0
d1The data line 1
d2The data line 2
d3The data line 3
d4The data line 4
d5The data line 5
d6The data line 6
d7the data line 7

◆ Adafruit_LiquidCrystal() [3/6]

Adafruit_LiquidCrystal::Adafruit_LiquidCrystal ( uint8_t  rs,
uint8_t  rw,
uint8_t  enable,
uint8_t  d0,
uint8_t  d1,
uint8_t  d2,
uint8_t  d3 
)

LiquidCrystal constructor for reading or writing from a display.

Parameters
rsThe reset data line
rwThe read write pin. Determines whether to read to or write from display. Not necessary if only writing to display
enableThe enable data line
d0The data line 0
d1The data line 1
d2The data line 2
d3The data line 3

◆ Adafruit_LiquidCrystal() [4/6]

Adafruit_LiquidCrystal::Adafruit_LiquidCrystal ( uint8_t  rs,
uint8_t  enable,
uint8_t  d0,
uint8_t  d1,
uint8_t  d2,
uint8_t  d3 
)

LiquidCrystal constructor for only writing to a display.

Parameters
rsThe reset data line
enableThe enable data line
d0The data line 0
d1The data line 1
d2The data line 2
d3The data line 3

◆ Adafruit_LiquidCrystal() [5/6]

Adafruit_LiquidCrystal::Adafruit_LiquidCrystal ( uint8_t  i2cAddr,
TwoWire *  wire = &Wire 
)

LiquidCrystal constructor for connection over i2c.

Parameters
i2cAddrAddress of the display. Can use either actual I2C address (0x20, 0x21, etc.) or offset from 0x20 base address (0, 1, etc.).
wireOptional pointer to Wire instance to use. Defaults to Wire.

◆ Adafruit_LiquidCrystal() [6/6]

Adafruit_LiquidCrystal::Adafruit_LiquidCrystal ( uint8_t  data,
uint8_t  clock,
uint8_t  latch 
)

LiquidCrystal constructor for connection over SPI.

Parameters
dataData pin
clockClock pin
latchlatch pin

Member Function Documentation

◆ init()

void Adafruit_LiquidCrystal::init ( uint8_t  fourbitmode,
uint8_t  rs,
uint8_t  rw,
uint8_t  enable,
uint8_t  d0,
uint8_t  d1,
uint8_t  d2,
uint8_t  d3,
uint8_t  d4,
uint8_t  d5,
uint8_t  d6,
uint8_t  d7 
)

Initializes the display.

Parameters
fourbitmodeSets the mode of the display, either 4 bit or 8 bit
rsThe reset data line
rwThe read write pin. Determines whether to read to or write from display. Not necessary if only writing to display
enableThe enable data line
d0The data line 0
d1The data line 1
d2The data line 2
d3The data line 3
d4The data line 4
d5The data line 5
d6The data line 6
d7the data line 7

◆ begin()

bool Adafruit_LiquidCrystal::begin ( uint8_t  cols,
uint8_t  rows,
uint8_t  charsize = LCD_5x8DOTS 
)

Starts I2C connection with display.

Parameters
colsSets the number of columns
rowsSets the number of rows
charsizeSets the charactersize
Returns
Returns true when connection was successful

◆ setBacklight()

void Adafruit_LiquidCrystal::setBacklight ( uint8_t  value)

High-level command to set the backlight, only if the LCD backpack is used.

Parameters
valueSet the backlight off/on, 0 = off, >0 = on.

◆ createChar()

void Adafruit_LiquidCrystal::createChar ( uint8_t  location,
uint8_t  charmap[] 
)

High-level command that creates custom character in CGRAM.

Parameters
locationLocation in cgram to fill
charmap[]Character map

◆ setCursor()

void Adafruit_LiquidCrystal::setCursor ( uint8_t  col,
uint8_t  row 
)

High-level command that sets the location of the cursor.

Parameters
colColumn to set the cursor in
rowRow to set the cursor in

◆ write()

void Adafruit_LiquidCrystal::write ( uint8_t  value)
inlinevirtual

Mid-level command that sends data to the display.

Parameters
valueData to send to the display

◆ command()

void Adafruit_LiquidCrystal::command ( uint8_t  value)
inline

Sends command to display.

Parameters
valueCommand to send

The documentation for this class was generated from the following files: