Code to use a set of Adafruit NeoTrellis boards as a monome grid clone using an off-the-shelf microcontroller.
A number of different microcontrollers have been used for this project. Raspberry Pi Pico (rp2040) boards are the current recommended solution.
See the various subdirectories for code specific to different board types.
At the time of writing, this code works as expected with the neotrellis-grid connected to a computer with Max running monome patches.
Some people have reported issues with the neotrellis-grid getting recognized by Windows 10. Windows users are advised to install serialosc 1.4.3 and bonjour print services (v2.0.2?).
Older builds with Teensy should work with the monome modules. RP2040 devices have had problems and may not work with these modules.
As of update version 210607 (June 2021) it should be plug and play.
For Fates devices this should be functional by default on the most recent firmwares.
8 Adafruit NeoTrellis driver boards [alt Mouser | Digikey ]
8 Button keypads [alt Mouser | Digikey ]
1 Adafruit micro B USB Breakout [alt Mouser | Digikey ]
1 Teensy 3.2 [alt Adafruit ]
1 Adafruit STEMMA/JST-PH 4-pin cable - for testing inndividual neotrellis boards before assembly. Cut the cable in half and wire to the appropriate pins on a Teensy or other microcontroller (VIN, GND, SCL, SDA). See the neotrellis boards themselves for the pin-out.
Standard pin headers - 10 1x5 pin headers can be used for joining the neotrellis boards together. See video
Flexible PCB Carrier (Flexi PCB) for mounting the teensy to the neotrellis boards. Teensy version for sale here or Pico version here
Q: Do I need the Flexible PCB Carrier if I have the dink-ii board? A: No. The dink-ii board replaces the Flexi-PCB.
- Test each neotrellis board individually using the Adafruit examples in the
File>Examples>Adafruit seesaw Library>Neotrellismenu. The Basic sketch is good for testing individual boards. Themultitrellis>basicsketch is good once you have all the boards connected and addresses assigned.
-
Review the Adafruit tutorial on the neotrellis boards.
-
see this video for an example of how to join the boards together
-
see this graphic for a default layout of addresses and jumper positions for 8 neotrellis boards.
-
new default address order in the code for 16x8 layout (NOTE the address are in reverse order in the code - as compared to the graphic above):
{ Adafruit_NeoTrellis(0x32), Adafruit_NeoTrellis(0x30), Adafruit_NeoTrellis(0x2F), Adafruit_NeoTrellis(0x2E)}, // top row
{ Adafruit_NeoTrellis(0x33), Adafruit_NeoTrellis(0x31), Adafruit_NeoTrellis(0x3E), Adafruit_NeoTrellis(0x36) } // bottom row
-
see this neotrellis i2c address chart if you want to define your own addresses
-
Don't worry about the INT pin - it's not used in the grid software.
See the repo directories for using the Adafruit Neotrellis M4 device (8x4 grid) or SAMD M0/M4 devices (like Adafruit's Feather/ItsyBitsy/QtPy/etc). Precompiled UF2 firmwares are available in those directories for some configurations.
-
Triple check your address jumpers - see this graphic for a default layout of addresses and jumper positions for 8 neotrellis boards.
-
With Arduino - Be sure you have the Adafruit Seesaw libraries installed and are up to date (via the Arduino/Teensyduino Library Manager)
-
Use the multitrellis_test sketch to test fully assembled grid before flashing neotrellis_monome_teensy.
-
Be aware - the multitrellis array will fail to initialize if the addresses are wrong, or the wrong number of boards are attached. If you get no LEDs are just some LEDs - then your addresses are likely the problem.
-
There are Teensy specific
i2c_t3example sketches which can be used to double check your i2c addresses. SeeFile>Examples>i2c_t3>basic_scannerin Arduino/Teensyduino for more.
https://github.com/oldmanfury/neotrellis-grid-paletted
If you already have serialosc installed/running, you may need to unload serialosc to get arduino to properly flash the teensy, then load serialosc to get Max to recognize the grid.
launchctl unload /Library/LaunchAgents/org.monome.serialosc.plist
launchctl load /Library/LaunchAgents/org.monome.serialosc.plist
Max apps for testing:
Monome Home
test-grid
The mext protocol is used for serial communication - same as what is used in most recent monome devices.
serialosc is required for serial communication with MacOS/Windows computers and OSC devices. Linux may use serialosc or libmonome depending on the application. libmonome is basically driver code which also facillitates monome serial communication.
You can get both serialosc and libmonome code from monome github page, and building them is well documented on official linux docs (they work for macOS as well), read part 2 Preparing your system: serialosc (ignoring the sudo apt-get - I was missing liblo, but it's available on homebrew): monome.org/docs/linux/.