lcd.gpio#

class platypush.plugins.lcd.gpio.LcdGpioPlugin(pin_rs: int, pin_e: int, pins_data: List[int], pin_rw: int | None = None, pin_mode: str = 'BOARD', pin_backlight: int | None = 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: int | None = None, pin_mode: str = 'BOARD', pin_backlight: int | None = 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 or BCM. 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 is None

  • backlight_mode – Set this to either active_high or active_low to configure the operating control for the backlight. Has no effect if pin_backlight is None

  • dotsize – Some 1 line displays allow a font height of 10px. Allowed: 8 or 10. Default: 8.

  • charmap – The character map used. Depends on your LCD. This must be either A00 or A02 or ST0B. 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.