sasha1sum / neotrellis-monome

DIY neotrellis monome grid

Repository from Github https://github.comsasha1sum/neotrellis-monomeRepository from Github https://github.comsasha1sum/neotrellis-monome

neotrellis monome compatible grid

Status: work in progress. Not exactly noob friendly just yet.

What is it?

Code to use a set of Adafruit NeoTrellis boards as a monome grid clone.

Tested mostly using a Teensy 3.2 microcontroller.

There is code for using an Adafruit ItsyBitsy M0 (and by extension the Feather M0/M4), but this requires some changes to the underlying libraries (replacing the Adafruit_USBD_Device library deep in the adafruit/arduino core libraries).

Compiled firmware for Feather M4 and ItsyBitsy M0 coming soon.

compatibility

Max or other computer-based applications

At the time of writing, this code works as expected with the neotrellis-grid connected to a computer with Max running monome patches.

ansible/ trilogy modules

Does not work. Don’t ask (unless you know C well and can help me make changes to libavr32).

norns /norns shield

Officially unsupported. Hacking required. Proceed at your own risk. May void your warranty. Prohibited in some states.

Unfortunately this code will not work right off the shelf with the stock norns codebase (norns and norns shield) due to some USB device management stuff.

But... there is a hack workaround, but it does require changes to the norns C code. It’s not hard, but steps will need to be repeated after updates, etc. Contact me for instructions.

Fates

For Fates devices , I have a script in my repo which will run the fix.

Build

BOM:

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 ]

before building

  • Test each neotrellis board individually using the Adafruit examples in the File>Examples>Adafruit seesaw Library>Neotrellis menu. The Basic sketch is good for testing individual boards. The multitrellis>basic sketch is good once you have all the boards connected and addresses assigned.

neotrellis building

neotrellis address assignment

  • 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.

firmware flashing

For the Teensy firmware - be sure you have Arduino settings Tools -> USB Type set to Serial

Not critical, but set Tools -> CPU Speed to 120 MHz (overclock)

For reference: here's a forum post on how to flash Teensy firmware

troubleshooting / testing

  • Be sure you have the Adafruit Seesaw libraries installed and are up to date (via the Arduino Library Manager)

  • Be aware - the multitrellis array will fail to initialize if the addresses are wrong, or the wrong number of boards are attached.

  • There are Teensy specific i2c_t3 example sketches which can be used to double check your i2c addresses. See File>Examples>i2c_t3>basic_scanner for more.

  • use multitrellis_test sketch to test fully assembled grid before flashing neotrellis_monome_teensy.

build help / support / troubleshooting

see this thread on the lines forum for assistance.

alternate firmware for color palettes

https://github.com/oldmanfury/neotrellis-grid-paletted

norns shield

If you're on norns shield with 200218 do the following (if you're on another version, update first).

NOTE - Be aware this is a hack/workaround and is not officially supported. Proceed at your own risk

cd ~/
sudo apt-get update
sudo apt-get install libncurses5-dev libncursesw5-dev
wget https://raw.githubusercontent.com/okyeron/fates/master/install/norns/files/device/device_monitor.c
cd ~/norns
git pull
git submodule update --init --recursive
sudo cp -f /home/we/device_monitor.c /home/we/norns/matron/src/device/device_monitor.c
rm /home/we/device_monitor.c
./waf clean
./waf configure --enable-ableton-link
./waf build
sudo reboot

testing with serialosc on MacOS

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

Case / Enclosure

Work in progress

references

mext / monome serial protocol

The mext protocol is used for serial communication - same as what is used in most recent monome devices.

serialosc / libmonome

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/.

About

DIY neotrellis monome grid


Languages

Language:C++ 93.3%Language:C 6.7%