lcd.gpio
Platypush documentation
lcd.gpio
- class platypush.plugins.lcd.gpio.LcdGpioPlugin(pin_rs: int, pin_e: int, pins_data: List[int], pin_rw: Optional[int] = None, pin_mode: str = 'BOARD', pin_backlight: Optional[int] = None, cols: int = 16, rows: int = 2, backlight_enabled: bool = True, backlight_mode: str = 'active_low', dotsize: int = 8, charmap: str = 'A02', auto_linebreaks: bool = True, compat_mode: bool = False, **kwargs)[source]
Bases:
LcdPlugin
Plugin to write to an LCD display connected via GPIO.
Requires:
RPLCD (
pip install RPLCD
)RPi.GPIO (
pip install RPi.GPIO
)
- __init__(pin_rs: int, pin_e: int, pins_data: List[int], pin_rw: Optional[int] = None, pin_mode: str = 'BOARD', pin_backlight: Optional[int] = None, cols: int = 16, rows: int = 2, backlight_enabled: bool = True, backlight_mode: str = 'active_low', dotsize: int = 8, charmap: str = 'A02', auto_linebreaks: bool = True, compat_mode: bool = False, **kwargs)[source]
- Parameters:
pin_rs – Pin for register select (RS).
pin_e – Pin to start data read or write (E).
pins_data – List of data bus pins in 8 bit mode (DB0-DB7) or in 4 bit mode (DB4-DB7) in ascending order.
pin_mode – Which scheme to use for numbering of the GPIO pins, either
BOARD
orBCM
. Default:BOARD
.pin_rw – Pin for selecting read or write mode (R/W). Default:
None
, read only mode.pin_backlight – Pin for controlling backlight on/off. Set this to
None
for no backlight control. Default:None
.cols – Number of columns per row (usually 16 or 20). Default:
16
.rows – Number of display rows (usually 1, 2 or 4). Default:
2
.backlight_enabled – Whether the backlight is enabled initially. Default:
True
. Has no effect if pin_backlight isNone
backlight_mode – Set this to either
active_high
oractive_low
to configure the operating control for the backlight. Has no effect if pin_backlight isNone
dotsize – Some 1 line displays allow a font height of 10px. Allowed:
8
or10
. Default:8
.charmap – The character map used. Depends on your LCD. This must be either
A00
orA02
orST0B
. Default:A02
.auto_linebreaks – Whether or not to automatically insert line breaks. Default:
True
.compat_mode – Whether to run additional checks to support older LCDs that may not run at the reference clock (or keep up with it). Default:
False
.