trellism4_extended
¶
CircuitPython library to extended Adafruit NeotrellisM4 board with two Neotrellis seesaw boards (or more !).
Author(s): arofarn
Implementation Notes¶
Hardware:
Adafruit NeoTrellis M4 Express: https://www.adafruit.com/product/3938
Adafruit NeoTrellis RGB Driver PCB for 4x4 Keypad :https://www.adafruit.com/product/3954
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
Adafruit CircuitPython bus_devices library (from Adafruit_CircuitPython_Bundle): https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases
- class trellism4_extended.NeoTrellisM4(left_part=None)¶
Driver for the Adafruit NeoTrellis.
- Parameters
left_part – None (default) or left part object
Note
if None (or ommitted) the class create a neotrellis.multitrellis-compatible object for the left half of the TrellisM4 board. Else the right part is created and the arguement should be the left part object.
Example:
from neotrellism4 import NeoTrellisM4 trellis_left = NeoTrellisM4() trellis_right = NeoTrellisM4(left_part=trellis_left)
- activate_key(key, edge, enable=True)¶
Activate or deactivate a key on the trellis
:param int key : key number from 0 to 16. :param int edge : specifies what edge to register an event on and can be NeoTrellis.EDGE_FALLING or NeoTrellis.EDGE_RISING. :param bool enable : should be set to True if the event is to be enabled, or False if the event is to be disabled.
- property count¶
Return the pressed keys count
- property interrupt_enabled¶
Only for compatibility with neotrellis module: Interrupts are disable on trellis M4 keypad
- set_event(key, edge, enable)¶
Control which kinds of events are set
- sync()¶
Read any events from the Trellis hardware and call associated callbacks.