Arduino Midi Touchpad

I’ve always wanted to have something such as the Korg Kaoss Pad, but it’s a quite expensive device and, moreover, I’m not sure that it can send MIDI message to another MIDI device.

So, I decided to build one, all by myself :-).

Here you can find a demo of it, interacting with some Propellerheads Reason Studio filters

You can find the source code here :

This is a touchpad sketch turning an Arduino UNO and a Adafruit 2.8'' TFT Touchscreen into a MIDI device able to send control change message over USB.

It is based on this article :

It uses the following libraries :

Arduino UNO R3 is available here :

TFT shield available here :

The Arduino Code

The code (src/arduino-midi-touchpad/arduino-midi-touchpad.ino) is, I think :-), well commented and self explanatory. If there is something unclear, if you have any suggestions, remarks or optimisations, feel free to contact me :

Flashing the UNO USB controler

As I'm using a Macbook, the explanation here are based on the tools I'm using. The is an equivalent for the Linux and Windows world too, but can't test them for now (If someone can document this, please do!)

The tricky part of this small project is flashing the USB controller of the Arduino UNO R3 to turn it into a class compliant MIDI device.


First you need to acquire a AVRISP programmer available for a few euros on all electronic e-shop (I bought mine here, it worked straight forward on my MacBook Pro :

Then you have to install avrdude, which is the tool you're going to use to properly flash the USB controler of the UNO. Just follow step by step the information given on this page :, it's quite simple.

You need to know is that, once the USB controler of the Arduino will be acting as a MIDI device, you won't be able to send code updates using the Arduino IDE anymore. So, for now, we will have to flash it to MIDI and revert it along the development process. I read that there is a better way of doing but haven't managed to do it for now.

Flashing the USB controler to MIDI

Arduino AVR ISP Flash

What we wanna do know is to get the USB microcontroler code the will make it act as a MIDI class compliant controler. To do that git clone this repository :
The go in the hiduino/compiled_firmwares directory.
Find out to which USB port your AVR ISP Programmer is plugged to. On MacOS, just have a look at the /dev/ directory with ls /dev/. In my case, it is /dev/cu.SLAB_USBtoUART. So, adapt the -P argument and execute the following command in the terminal :

avrdude -p at90usb82 -F -P /dev/cu.SLAB_USBtoUART -c avrispmkii -U flash:w:arduino_midi.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

Your Arduino should now be recognized as a MIDI device by your computer.
Arduino as a MIDI USB Device

Revert to USB controler to it's original state

The original USB microcontroler code can be found in the Arduino IDE package. On MacOS it is located here : /Applications/

To revert the USB microcontroler of your Arduino UNO R3 back to the original, adapt the -P argument and execute :
avrdude -p at90usb82 -F -P /dev/cu.SLAB_USBtoUART -c avrispmkii -U flash:w:UNO-dfu_and_usbserial_combined.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m