I use computers a lot, so when I’m not using computers, I really don’t want to use computers.
I also play mandolin (and other stringed instruments) with a few friends once a week, and we want to be able to start (and stop) recording without having to use a computer keyboard or mouse. It’s also about 5 feet away from where we play, and I’m pretty lazy, so a custom USB controller seemed to be a solution.
The Sparkfun Pro Micro comes equipped with a full-speed USB transceiver, which I don’t think Arduino does (yet).
A great little board, but it is tiny - soldering header pins made me feel old.
I had a couple of fun switches which I’d wanted to use for something silly.
And bought a small enclosure from ebay
To mount inside
The code is very simple. The missile trigger switch sends a custom sequence which activates an AppleScript on my server which opens Audacity
Keyboard.press(KEY_LEFT_GUI); Keyboard.press(KEY_LEFT_SHIFT); Keyboard.press('1'); // send a command to the computer via Keyboard HID Keyboard.releaseAll();
The fire button sends:
to record, and:
I added LEDs. One to tell me when the controller is plugged in
One for when it’s activated
And a blinking LED when we’re recording
The finished product
The code is here.
This was a fun project. Computer hardware interfaces are very generic but the tasks we need them for often are not.
It turns out, making your own interfaces is fun, easy and cheap, and makes the creative process more productive, more informative and more personal.
You’ll never know what you need if you always accept what you’re given.