SP Button Pad Controller ACT II (adventures in the AVRland)

Since things didn’t work out as smoothly as I expected, no proper information on the net, nor anyone wrote a library for it; spent few sleepless nights trying to figure it out, things seemed doomed.. I decided to contact Spark Fun for more technical info. Within an hour they answered me, was really helpful but tried to answer as much as he could and gave me a fresh set of ideas.

After going through the schematics of the board and its original firmware code, I realized that the USB board has two ATmega328 micro-controllers. As opposed to the ISP board that has only one that controls the LED and button matrix . Basically the USB board acts as an ISP board with a built in “Arduino” to control it. So the idea was to burn an Arduino bootloader onto the Master controller and just use it as an Arduino, easy I thought.

Not so much as it  turned out. I needed an AVR programmer, which of course I did not have. But fear not, to the rescue came the Arduino Mini Pro boards I got earlier, they can be rigged and used as programmers (sounds like a fun party). Furthermore, I had to do a small dirty trick to disable reset on the Mini Pro, basically put a capacitor between the Reset and Ground pins. But none of the boot loaders worked properly and I was getting desperate again. Also the board lost its USB API so I tried to re-compile and restore its original firmware.  And so it struck me, why not just modify the existing firmware to send midi data directly whenever a button is pressed and also light up that button. Of course this would be the optimal solution as I would not need a driver application to run the whole thing, just route the MIDI traffic through to my applications.

After more than 5 days of less than 3 hours sleep per day, endless testing, trial by error and just aimlessly poking around I finally get a MIDI signal and a led on! Victory! The firmware still needs a lot of optimization but at least now I know I’m on the correct track, and can finally get a good night’s sleep without commands and diagrams on my mind!

6 thoughts on “SP Button Pad Controller ACT II (adventures in the AVRland)

  1. Hi, thanks for a good site, many interesting posts!.. Im tying to do this myself.. But I got 2 button pad spi’s connected to an arduino, wil lha work? Iam new to this, jsut minor skills in processing and arduino, so I wonder if you can share the code for the controller in the video above? Under stand if you dont want to but it would be so mutch easier for me to learn.. thanks again // Love

  2. hello, I am very impressed by your work!
    I am looking at this very moment the buttons like the ones you used to make your controller.
    Could you tell me where you have bought? or what search terms on ebay?
    Thank you for your help.

  3. Ehi man, i love your project but i have a question: i need to create a led keyboard as in your video here, with relative ASCII code to button linked via USB to my computer through arduino. Any advice for me? Thanks!

Leave a Comment