The MIDI keypad can send note on/off messages as well as pitch bend and mod wheel CC (continuous controller) messages. This example code works on the NeoTrellis M4 with both USB MIDI over the micro USB port and classic MIDI over the UART serial port.
In order to make it simple to get up and running with your Trellis M4 Classic MIDI Controller with no programming required, we've created a drag-and-drop firmware you can use. You can skip to the page Custom Code in Arduino if you want to customize things!
If you're just getting started with your NeoTrellis, there is lots more info here in the main Learn Guide!
First, download the firmware file linked in the button below and save it to your computer hard drive somewhere you'll be able to find it, such as your Downloads folder.
Plug your NeoTrellis M4 into your computer with a good quality, data capable USB cable. Life is too short to go through the pain of accidentally using a power-only USB cable, so please round up any you own, cut them in half, travel to a distant land, bury them, and dance on their grave.
Your NeoTrellis will start up, and you'll see a purple indicator light on the back side.
Now, we'll put the NeoTrellis into "bootloader" mode. In this mode it will appear as a USB drive on your computer and will be ready to receive a new .uf2 firmware file. Use a thin, pointed object such as a headphone plug to double-click the reset button on the back side of the board.
Finally, plug your MIDI cable into your synthesizer MIDI-IN jack, power up the NeoTrellis via USB power, and play!
While playing, use the keypad as a chromatic keyboard, the forward/backward tilt as mod wheel control, and the side-to-side tilt as pitch bend.
The MIDI arpeggiator example code works on the NeoTrellis with both USB MIDI over the micro USB port and classic MIDI over the UART serial port.
Install it this file below the same way as you did with the keypad firmware on the previous page.
If you'd like to customize things further, you can edit the code in Arduino. Open your Arduino IDE. If you are new to Arduino, check out this guide: Adafruit Arduino IDE Setup.
You'll also need to make sure you've updated your Board Definitions to version 1.2.8 or higher of the SAMD boards by heading to Tools -> Board Manager in the Arduino IDE, filter for "Adafruit SAMD" and choose the install shown below.