Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed-os-example-mbed6-wifi_MY_SOCKET_rigtech_copy_
LiquidCrystal_I2C Class Reference
This is the driver for the Liquid Crystal LCD displays that use the I2C bus. More...
#include <LiquidCrystal_I2C.h>
Public Member Functions | |
LiquidCrystal_I2C (unsigned char lcd_addr, unsigned char lcd_cols, unsigned char lcd_rows, unsigned char charsize=LCD_5x8DOTS) | |
Constructor. | |
void | begin () |
Set the LCD display in the correct begin state, must be called before anything else is done. | |
void | clear () |
Remove all the characters currently shown. | |
void | home () |
Next print/write operation will will start from the first position on the LCD display. | |
void | noDisplay () |
Do not show any characters on the LCD display. | |
void | display () |
Show the characters on the LCD display, this is the normal behaviour. | |
void | noBlink () |
Do not blink the cursor indicator. | |
void | blink () |
Start blinking the cursor indicator. | |
void | noCursor () |
Do not show a cursor indicator. | |
void | cursor () |
Show a cursor indicator, cursor can blink on not blink. |
Detailed Description
This is the driver for the Liquid Crystal LCD displays that use the I2C bus.
After creating an instance of this class, first call begin() before anything else. The backlight is on by default, since that is the most likely operating mode in most cases.
Definition at line 60 of file LiquidCrystal_I2C.h.
Constructor & Destructor Documentation
LiquidCrystal_I2C | ( | unsigned char | lcd_addr, |
unsigned char | lcd_cols, | ||
unsigned char | lcd_rows, | ||
unsigned char | charsize = LCD_5x8DOTS |
||
) |
Constructor.
- Parameters:
-
lcd_addr I2C slave address of the LCD display. Most likely printed on the LCD circuit board, or look in the supplied LCD documentation. lcd_cols Number of columns your LCD display has. lcd_rows Number of rows your LCD display has. charsize The size in dots that the display has, use LCD_5x10DOTS or LCD_5x8DOTS.
Definition at line 26 of file LiquidCrystal_I2C.cpp.
Member Function Documentation
void begin | ( | ) |
Set the LCD display in the correct begin state, must be called before anything else is done.
Definition at line 35 of file LiquidCrystal_I2C.cpp.
void blink | ( | ) |
Start blinking the cursor indicator.
Definition at line 139 of file LiquidCrystal_I2C.cpp.
void clear | ( | ) |
Remove all the characters currently shown.
Next print/write operation will start from the first position on LCD display.
Definition at line 96 of file LiquidCrystal_I2C.cpp.
void cursor | ( | ) |
Show a cursor indicator, cursor can blink on not blink.
Use the methods blink() and noBlink() for changing cursor blink.
Definition at line 129 of file LiquidCrystal_I2C.cpp.
void display | ( | ) |
Show the characters on the LCD display, this is the normal behaviour.
This method should only be used after noDisplay() has been used.
Definition at line 119 of file LiquidCrystal_I2C.cpp.
void home | ( | ) |
Next print/write operation will will start from the first position on the LCD display.
Definition at line 101 of file LiquidCrystal_I2C.cpp.
void noBlink | ( | ) |
Do not blink the cursor indicator.
Definition at line 135 of file LiquidCrystal_I2C.cpp.
void noCursor | ( | ) |
Do not show a cursor indicator.
Definition at line 125 of file LiquidCrystal_I2C.cpp.
void noDisplay | ( | ) |
Do not show any characters on the LCD display.
Backlight state will remain unchanged. Also all characters written on the display will return, when the display in enabled again.
Definition at line 115 of file LiquidCrystal_I2C.cpp.
Generated on Tue Jul 12 2022 12:28:12 by
