API Reference
adafruit_neotrellis
A CircuitPython driver class for the 4x4 NeoTrellis with elastomer buttons and NeoPixel RGB LEDs.
Author(s): Dean Miller, JG for CedarGroveMakerStudios
Implementation Notes
Hardware:
‘NeoTrellis RGB Driver PCB for 4x4 Keypad, PID: 3954 <https://www.adafruit.com/product/3954>’
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
Adafruit Seesaw CircuitPython library https://github.com/adafruit/Adafruit_CircuitPython_seesaw/releases
- class adafruit_neotrellis.neotrellis.NeoTrellis(i2c_bus, interrupt=False, addr=46, drdy=None, brightness=1.0, auto_write=True)
Driver for the Adafruit 4x4 NeoTrellis.
- activate_key(key, edge, enable=True)
Activate or deactivate a key on the trellis. Key is the key number from 0 to 16. Edge specifies what edge to register an event on and can be NeoTrellis.EDGE_FALLING or NeoTrellis.EDGE_RISING. enable should be set to True if the event is to be enabled, or False if the event is to be disabled.
- property brightness
The NeoPixel brightness level of the board.
- show()
Show the NeoPixels on the Trellis
- sync()
read any events from the Trellis hardware and call associated callbacks
adafruit_multitrellis
A CircuitPython driver class for interfacing clusters of 4x4 NeoTrellis with elastomer buttons and NeoPixel RGB LEDs.
Author(s): Dean Miller, JG for CedarGroveMakerStudios
Implementation Notes
Hardware:
‘NeoTrellis RGB Driver PCB for 4x4 Keypad, PID: 3954 <https://www.adafruit.com/product/3954>’
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
Adafruit Seesaw CircuitPython library https://github.com/adafruit/Adafruit_CircuitPython_seesaw/releases
- class adafruit_neotrellis.multitrellis.MultiTrellis(neotrellis_array)
Driver for multiple connected Adafruit NeoTrellis boards.
- activate_key(x, y, edge, enable=True)
Activate or deactivate a key on the trellis. x and y are the index of the key measured from the top lefthand corner. Edge specifies what edge to register an event on and can be NeoTrellis.EDGE_FALLING or NeoTrellis.EDGE_RISING. enable should be set to True if the event is to be enabled, or False if the event is to be disabled.
- property brightness
The NeoPixel brightness level of all clustered NeoTrellis boards.
- color(x, y, color)
Set the color of the pixel at index x, y measured from the top lefthand corner of the matrix
- set_callback(x, y, function)
Set a callback function for when an event for the key at index x, y (measured from the top lefthand corner) is detected.
- show()
Show the colors on the NeoPixels
- sync()
Read all trellis boards in the matrix and call any callbacks