Do you also provide a circuit diagram in Arduino Mega? I can not find anything like this in this topic.
Connections for the Arduino Mega:
Midi Output:
- MIDI DIN socket pin 5 connected to Arduino pin 1 (TX) through a 220 ohm resistor
- MIDI DIN socket pin 4 connected to Arduino +5 pin through a 220 ohm resistor
- MIDI DIN socket pin 2 connected to ground
Instructions:
https://www.arduino.cc/en/Tutorial/Midi
Switches:
Common terminal of all switches connected to ground
The 15 Switches are connected to pins n. 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50
http://www.instructables.com/id/Arduino-Button-with-no-resistor/
LEDs:
- Cathode (short leg) connected to ground
- Anode (long leg) connected through a 220 Ohm resistor to pins n. 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51
https://www.arduino.cc/en/tutorial/blink