Adafruit CharLCD Plate&Chinese “LCD RGB KEYPAD” shield input driver

This driver works with Adafruit Raspberry Pi character LCD&button shields, as well as with Chinese clones following the schematic (can be bought for 5$ on eBay, typically have “LCD RGB KEYPAD ForRPi” written on them).

Sample config.json section:



Generally, you won’t need to edit config.json if you’re using this shield because it’ll be done automatically by

class input.drivers.adafruit_plate.InputDevice(addr=32, bus=1, **kwargs)[source]

A driver for Adafruit-developed Raspberry Pi character LCD&button shields based on MCP23017, either Adafruit-made or Chinese-made.

Tested on hardware compatible with Adafruit schematic and working with Adafruit libraries, but not on genuine Adafruit hardware.

__init__(addr=32, bus=1, **kwargs)[source]

Initialises the InputDevice object.


  • bus: I2C bus number.
  • addr: I2C address of the expander.

Initialises the IO expander.


Polling loop (only one there can be on this shield, since interrupt pin is not connected).


Checks data received from IO expander and classifies changes as either “button up” or “button down” events. On “button up”, calls send_key with the corresponding button name from self.mapping.

setMCPreg(reg, val)[source]

Sets the MCP23017 register.


Reads the MCP23017 register.