adafruit_neotrellis

4x4 elastomer buttons and RGB LEDs

  • Author(s): Dean Miller

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_neotrellis.neotrellis.NeoTrellis(i2c_bus, interrupt=False, addr=46, drdy=None)

Driver for the Adafruit 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.

sync()

read any events from the Trellis hardware and call associated callbacks

Interface for connecting together multiple NeoTrellis boards.

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.

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.

sync()

Read all trellis boards in the matrix and call any callbacks