Reference
Library
Download Link: Sample code and library. Library: LiquidCrystal_I2C v1.1. Compatible with Arduino IDE 1.0 or higher.
Communication Protocol Description
Communication Method: I2C.
I2C Address Range: 0x20-0x27 (default 0x20).
Address Setting: The I2C address is determined by the jumper caps (A2, A1, A0).
Address Setting Table:
| A2 | A1 | A0 | 地址 |
|---|---|---|---|
| 0 | 0 | 0 | 0x20 |
| 0 | 0 | 1 | 0x21 |
| 0 | 1 | 0 | 0x22 |
| 0 | 1 | 1 | 0x23 |
| 1 | 0 | 0 | 0x24 |
| 1 | 0 | 1 | 0x25 |
| 1 | 1 | 1 | 0x26 |
| 1 | 1 | 1 | 0x27 |
- 0: The Jumper Cap is connected
- 1: The Jumper Cap is disconnected
The default address is 0x20. All the jumper caps will be connected from the factory.
API Description
- LiquidCrystal_I2C() //set the LCD address for a 16 chars and 2 line display
- init() //Initialization for the LCD
- clear() //clear display, set cursor position to zero
- home() //set cursor position to zero
- createChar() //Fill the first 8 CGRAM locations with custom characters
- setCursor() //set the position of the cursor
- cursor() //Turns the underline cursor on
- noCursor() //Turns the underline cursor off
- blink() //Turn on the blinking cursor
- noBlink() //Turn off the blinking cursor
- display() //Turn the display on(quickly)
- noDisplay() //Turn the display 0ff(quickly)
- backlight() //Turn the backlight on
- noBacklight() //Turn the backlight off
- scrollDisplayLeft() //Make the display scroll left without changing the RAM
- scrollDisplayRight() //Make the display scroll right without changing the RAM
- autoscroll() //This will 'right justify' text from the cursor
- noAutoscroll() //This will 'left justify' text from the cursor
- leftToRight() //This is for text that flows Left to Right
- rightToLeft() //This is for text that flows Right to Left
Other Supplementary Information
DYP-ME007 Ultrasound range finder - display distance on a I2C 2x16 LCD
Was this article helpful?
