While perusing a local car boot sale, David Pride came across a Silverlit Air Drum Kit for the grand total of one whole shiny pound. And just like any digital maker, he bought it, realising the potential of this wondrous discovery.

David had been recently fiddling with the Python CWiid library, a resource that allows you to use Wii controllers (Wiimotes) with a Raspberry Pi via Bluetooth. However, it was the setup of two controllers to a single Pi that was causing issues:

I’d only ever managed to get one controller working with a single Pi before, so the first challenge was to get a pair of controllers working as the ‘sticks’. That took a lot of mucking about, until I found the excellent post by WiiGate that detailed how to set up two controllers properly, using the MAC addresses. You can find it here.

Once this hurdle had been overcome, David collected a variety of open-source drum sample .wav files from the abundance of sound clips available on the web.

David used Tkinter, writing a small app that would allow him to understand the positioning of the controllers, and as a result the data produced. Due to the nature of the controllers, movement wasn’t the only factor to consider. Speed and the way in which the controller was moved were also important. Move the controller quickly, and a different set of data is produced from that generated by a slower motion.

However, David isn’t one to give up and after a (relatively long) while, he had managed to plot positions for four distinct drum sounds:

I initially wanted to get three sounds on each controller, but the movement scale was a bit too tight to do it successfully every time, and two sounds often overlapped. So, I’m using the trigger button on each controller, combined with the movement for one of the sounds. This gives six different drum sounds, three per controller, that can be played without the sounds overlapping.

The final result of David’s tinkering is this wonderful air drum kit that provides a clean, impressive response with every movement. And because he’s such a lovely chap, all the code you need can be found at his GitHub page.

Raspberry Pi Air Drum Kit Easy Python project using 2 Wii controllers and a Raspberry Pi to create an ‘air drum’ kit

So David, all we need now is the air guitar, air bass and air keyboard, and we’ve got the start of this year’s Christmas Number One.

Band name suggestions welcome…