Hi johnnypig.
Using TTYMIDI requires to change the baudrate from 31250 to 115200. Then start TTYMIDI with a line like this ->
ttymidi -s /dev/ttyACM0 -b 115200 -n yaamidrum -v
Change the tty device to what your os uses in /dev (maybe /dev/ttyUSB0).
For debugging you have to alter some lines of the .ino code like this
Change
//Serial.begin(9600); // connect to the serial port 9600 (for debug)
//Serial.begin(57600); // connect to the serial port 57600
Serial.begin(31250); // connect to the serial port (31250) //midi standard
//Serial.begin(115200); // connect to the serial port 115200
to
Serial.begin(9600); // connect to the serial port 9600 (for debug)
//Serial.begin(57600); // connect to the serial port 57600
//Serial.begin(31250); // connect to the serial port (31250) //midi standard
//Serial.begin(115200); // connect to the serial port 115200
and
void MIDI_TX(unsigned char MESSAGE, unsigned char PITCH, unsigned char VELOCITY)
{
status = MESSAGE + midichannel;
Serial.write(status);
Serial.write(PITCH);
Serial.write(VELOCITY);
}
to
void MIDI_TX(unsigned char MESSAGE, unsigned char PITCH, unsigned char VELOCITY)
{
status = MESSAGE + midichannel;
Serial.write(" Status=");
Serial.print(status,DEC);
Serial.write(" Pitch=");
Serial.print(PITCH,DEC);
Serial.write(" Velocity=");
Serial.print(VELOCITY,DEC);
}
Make shure that the baud rate in the serial monitor window of the arduino ide is set to 9600.
How did you connect your piezos to the shield? It is important that you have to connect ALL inputs of the shield to piezos or you have to bridge the free inputs. You can simply use a small wire to connect the inner and outer inputs (not the middle) of the shield if there is no piezo connected to it. Otherwise it won't work.
Now it should work and hitting a piezo should result in various numbers in the serial monitor window. Please let me know the result cause I don't actually have the possibility to test the code on an Arduino Uno rev3.
Feel free to insert a switch in the code that decides if u debug or write the midi notes to serial out.
Thanks.