API
The LCD class interfaces to the LCD driver via I2C and provides a set of high-level user functions to display text, turn the display on and off, etc.
Parameters: |
|
---|
Cursor
Bases: Enum
The style of cursor displayed. One of:
LCD.Cursor.NONE
: No visible cursorLCD.Cursor.BLINK
: A blinking character cursorLCD.Cursor.UNDERSCORE
: An underscore cursor
backlight(on)
Turn the backlight on or off.
Parameters: |
|
---|
clear_display()
Clear the display.
clear_line(line, character=' ')
Erase the contents of a line.
Parameters: |
|
---|
display(on)
Turn the display on or off.
Parameters: |
|
---|
home()
Return the cursor to the home position (0, 0) and undo any shifts of the display.
move_to(line, position)
Set the cursor to a given position.
Parameters: |
|
---|
Raises: ValueError: If either the line number or character position are out of range.
print(s)
Write text to the display.
Parameters: |
|
---|
print_at(line, position, s)
set_cursor(style)
Select the type of cursor to be displayed. Select underline, blinking, or no cursor.
Parameters: |
|
---|