Monday, August 31, 2009

Introducing the ButtonPad

Update: A lot of people have been picking up the ButtonPad-Mega-Slide-Backpack combo, so I've put it up on the shop as the Portable MegaPalm Pack here.

The ButtonPad is a shield for the Arduino Mega. It is specifically designed to turn the Arduino Mega into a portable gadget, when combined with a TouchShield Slide.



You know that scene at the end of Star Wars, where the spirits of Obi Wan, Anakin Skywalker, and Yoda appear altogether to Luke? In case you forgot, it's this one... it's when the eerie theme music plays and you realize Luke has all along just been part of the bigger plan... dun dun dun...

The ButtonShield is like Anakin... tons of power, features, and more midichlorians - er buttons - than you know what to do with. The InputShield is like Obi Wan. The X-Y force is strong with him, but more in an analog sense if you know what I mean. That leaves only one. What follows is my tripartite inductive logic proof:

Assume this:


Corollary: let Anakin=ButtonShield, Obi Wan=InputShield:

Therefore:

Small in stature he may be, but powerful his API is.

The ButtonPad is like the Yoda of Arduino Shields, and the Arduino gadget platform.

This now completes the ButtonShield, InputShield, and ButtonPad Trilogy... Chris and I were thinking about how we could make a shield for the Slide that would make it a gaming platform, but we couldn't figure out why the Arduino guys decided to make the form-factor the way they did... for instance, I really wanted to put the ButtonShield on the Arduino Mega at the same time as the TouchShield Slide, but you can't... it just doesn't fit.



...but instead of getting upset, he and I decided to just think a little differently about the size and layout constraints, and instead make a "mini-shield" ala a "pad".

This is a set of pictures of me mounting the ButtonPad onto the Arduino Mega with a TouchShield Slide:



It fits directly onto the bottom part of the Arduino Mega, and there's a library built into the Antipasto Arduino IDE that allows anyone to interface to the ButtonPad to read characters. Here's some code that let's anyone read it:


#include ButtonPad.h

//Create a new ButtonPad
ButtonPad MyPad = ButtonPad();

void setup()
{
Serial.begin(9600);
}

void loop()
{
//Display the pressed buttons to the PC
Serial.println(MyPad.readButtons());

delay(250);

//Random LED blinkage
MyPad.ledWrite(random(0,6),HIGH);
MyPad.ledWrite(random(0,6),LOW);
}


And here are some more pictures of the Arduino Mega gadget:



I've uploaded some more pictures over on my Flickr page, and also Justin put it up for sale on the shop over here.

4 comments:

Chris said...

How did you mathematically generate that torus shape?

How cool would it be to physically interact with mathematical patterns on the press of a button?

That is so cool.

Matt said...

i wish! not yet, but i'm working on it... actually that's the reflection from the flourescent bulb. i was trying to figure out what you were referring to so it took me a second...

btw thanks :)

Mike Gionfriddo said...

NICE! It isn't even plugged into any power pins... how do the leds get power (or ground)? What does the bottom of the board look like?

Matt said...

wow, almost sold out for the next month already... i'll have more in october...sheesh...