The code you show above should run if you connect the i2c from neotrellis to i2c on pi zero.
from neotrellis document:
unfortunately, the pi zero doesn't have an i2c connector, so you need to wire one up
there is a good tutorial here: https://learn.sparkfun.com/tutorials/ras...-pi-boards
get that wired up, connect the pi to your tiled array through I2c (wired as in https://learn.adafruit.com/adafruit-neotrellis/tiling so only one I2C on neotrellis and you should be good to go. I'll get there in the next few days (with two neotrellis boards), but you should be able to get there faster as you already have it wired up.
I'd like to see the I2C output when a single button is pressed, haven't found that yet in the docs, but I expect that there will be a board address, and either the button xy, or the board pins as a byte or word bitmap. Don't know what this looks like, and the AdaFruit docs are kind of all over the place.
With this method, you will be able to distinguish the button press from any board in your matrix.
from neotrellis document:
Quote:These 4x4 button pad boards are fully tile-able and communicate over I2C. With 5 address pins, you've got the ability to connect up to 32 together in any arrangement you like. With our trusty seesaw I2C-to-anything chip, you don't even need to manage the NeoPixel driving. That's right! Both the button management and LED driving is completely handled for you all over plain I2C. With both Arduino/C++ and CircuitPython/Python library support, you can use these pads with any and all microcontroller or computer boards.
unfortunately, the pi zero doesn't have an i2c connector, so you need to wire one up
there is a good tutorial here: https://learn.sparkfun.com/tutorials/ras...-pi-boards
get that wired up, connect the pi to your tiled array through I2c (wired as in https://learn.adafruit.com/adafruit-neotrellis/tiling so only one I2C on neotrellis and you should be good to go. I'll get there in the next few days (with two neotrellis boards), but you should be able to get there faster as you already have it wired up.
I'd like to see the I2C output when a single button is pressed, haven't found that yet in the docs, but I expect that there will be a board address, and either the button xy, or the board pins as a byte or word bitmap. Don't know what this looks like, and the AdaFruit docs are kind of all over the place.
With this method, you will be able to distinguish the button press from any board in your matrix.