Drive for Waveshare’s I2C character display LCD1602.
A port of Waveshare’s RGB1602 Micropython library.
Implementation Notes
Hardware:
Software and Dependencies:
-
class waveshare_lcd1602.LCD1602(i2c: busio.I2C, columns: int, rows: int)
Setup a new RGB LCD1602 display
- Parameters:
i2c (busio.I2C) – I2C bus object to use.
columns (int) – The number of columns on the display.
rows (int) – The number of rows on the display.
-
begin(columns: int, rows: int)
Initial configuration, called from init.
- Parameters:
-
-
clear()
Clear the display.
-
command(cmd: int)
Send a command.
- Parameters:
cmd (int) – The command code.
-
display()
Turn on the display.
-
printout(arg: str | int)
Print a string to the display. Ints are converted to strings.
- Parameters:
arg (str|int) – The string or int to printout.
-
setColorWhite()
Set the color of the RGB backlight to white.
-
setCursor(col, row)
Place the cursor on the display.
- Parameters:
col (int) – The column.
row (int) – The row.
-
setRGB(r, g, b)
Set the color of the RGB backlight.
- Parameters:
r (int) – Red byte.
g (int) – Green byte.
b (int) – Blue byte.
-
setReg(reg, data)
Set the value of a register.
- Parameters:
-
-
write(data: int)
Write a data byte.
- Parameters:
data (int) – The data byte to write.