Hello, Arduino community. Total newbie with a little bit of prior programming (Java, C#, VBA) experience here.
I've been working on some code for my Bare Conductive Touch Board with an Olimex MIDI shield to send a simple MIDI CC message to my Digitech Whammy guitar effects pedal based on the proximity to a capacitive sensor. Basically, it will be controlled like a Theremin. I managed to compile my code with no errors, but (no surprise) the code doesn't actually do anything when tested with the Touch Board and the pedal. I borrowed somewhat heavily from the MIDI Theremin code found on the Bare Conductive website, which actually works when I upload it to the Touch Board.
For those not familiar with it, the Touch Board is more or less (for this application, anyway) an Arduino Leonardo with a built-in MPR121 capacitive touch controller. More information can be found here.
Also for reference, the MIDI shield I am working with can be found here.
To reiterate, the example MIDI Theremin code works flawlessly when uploaded to the board, and my code does nothing. There is even an led on the MIDI shield that lights up with the example code but not with mine. There is obviously something missing from mine, but I'm not sure what. And one important difference to note between mine and the example code is that I am trying to send MIDI data over hardware serial, but the example code uses SoftwareSerial since it doesn't need to actually send any data out of the board itself. Before anyone asks, yes I have soldered the real-time MIDI mode pads on the Touch Board, and yes, I have set the correct channel on the Whammy pedal.
Should I try to rewrite my code without the MIDI Library? Should I be using SoftwareSerial in my code for some reason? Any insight would be greatly appreciated! Thank you in advance.
midi_theremin.ino (18.5 KB)
Theremin_Whammy.ino (3.55 KB)