The Button

The Button

NOTE: Need a button? Now you can buy one! Visit our store or Etsy.

I was in need of a button, but not just any button. A USB-enabled button that could emulate a single key being pressed on a keyboard. This is that button…

It consists of the following materials:

The Button

I used a Teensy as it’s a very simple (and cheap!) way to emulate a USB HID. I do wish the Teensy had mounting holes. I ended up not mounting it at all and letting it just hang loose, which should be fine, as it’s so lightweight. There’s a bit of electrical tape wrapped around the Teensy and the solder joints.

For the box, I wanted something metal, so it would be heavier and more sturdy than the typical plastic project box. Matt Gauger of Milwaukee Makerspace suggested I check out Mammoth Electronics, as they make boxes for guitar pedals. I ended up choosing their “tall” enclosure.

For the button, I really like this button over the one I ended up using, but it was too tall to fit in the project box. Unless you’re a “button snob” you probably won’t notice much difference between the two.

If you’ve got USB cables lying around, use one… otherwise, you can get one from Monoprice for less than a dollar. I pretty much buy all my cables from Monoprice.

As for the rubber feet, I picked some up at the local hardware store… as well as some black spray paint. (Note: If you are ordering the button from Sparkfun, just get the rubber feet from them too!)

The Button

There was one more item I needed. The button needs a 27.3 mm hole to fit into, which means I needed a hole that was 1.07480315 inches wide. Well, 1.07480315 inches is pretty close to 1.0 inches, so I ended up getting an Ace Bi-Metal Variable Pitch Hole Saw. (The link is not the exact one that I got. I ended up getting mine at the local Ace Hardware store.)

As for the process, the Teensy part took a small amount of time, (see the AWESOME Button) and the drilling was a little tricky, as the 1.0 inch hole was just slightly too small. A bit of creative drilling with a regular drill bit fixed that though. The spray painting was the real time consuming part of it all. As for the assembly, I originally envisioned mounting the Teensy on the bottom plate of the box, and having a hole where the USB connector would be accessible, but I ended up going with what you see in the photo. (I just used the Dremel to cut a small groove for the cable to fit into.)

And why do I need a yellow button that can emulate a key being pressed? Well, sometimes you just need a yellow button that can emulate a key being pressed…

The Button

Note: A number of people have asked for the code I used, and even though it is in the comments, I thought I should post it in here as well.

 * Button.pde

void setup() {
  pinMode(10, INPUT_PULLUP);

void loop() {
  if (digitalRead(10) == HIGH) {
  } else {
    Keyboard.print(" "); // we print a space

Circuit-Bending with the Easy Button

Easy Button

I’ve had an easy button lying around the house for a few years now, and remembered reading about how “easy” it was to do a little circuit-bending with it, so I finally got around to doing that…

I did a quick search for some details and found this Easy! blog post, read the bit about a 1Meg pot and figured I’d give it a try. I didn’t have a 1Meg pot on hand (I’m sure the Milwaukee Makerspace probably has a boatload of potentiometers and other parts I could have used, but I built this thing at home) so I ended up going to Radio Shack, and while they don’t have breadboards or much other stuff, they do have a few electronic components on hand.

Once you open the Easy Button (screws are under the rubber feet) you can see the main resistor, right under the rubber switch. (It’s in the center in the photo below.)

Easy Open

Take that resistor out and then solder in the wires for the potentiometer. That should be about it for the electrical part of it… (I know, you also see a push-button switch in the top photo, I’ll get to that in a minute.)

Since I tend to just start on these things without any real thought as to how they will be finished—I fly by the seat of my pants a lot—it’s always a learning experience. I had a plan to mount the pot onto the big red button, so I Dremeled the heck out of one of the legs on the bottom side of the button to make it fit, and I then realized it just wouldn’t fit, so I thought I could mount it on the inside plastic housing with a hot glue gun, this worked well, but I took out the piece of metal to do this, and, well the metal piece is what makes the button pop back up, so when I reassembled it, the button didn’t work, as it got stuck. Oh, I also built it wrong, with the button turned 180 degrees, so things didn’t line up, so I Dremeled some more, and that contributed to making the button more useless, even though I tried to put half of the metal shield thing back in. (Hacksawing that thing was a nightmare!)

I had started to document the whole thing with photos, but when it was apparent I did so many things wrong, I abandoned the plan… that said, I’m pretty confident that if I did it again, I’d get it all right the second time. Despite all that, I came up with the idea of putting in the push-button switch, which worked great, as it is much easier to push, and you can use it while twiddling the knob. From the outside you really can’t tell that things didn’t work out the way I planned, so I’ll call that a win.

Here’s a video (Vimeo) of the Easy Button in action… It’s a challenge to get the knob in just the right position, so it’s become a game at our house to see who can get the best sound (or longest bend) out of it.

If you’re totally new to circuit-bending, the Easy Button is a simple project to start with… if you are totally clueless, swing on down to the Milwaukee Makerspace for one of their Electronics and Programming Nights when non-members are welcome, and I’m sure someone there can help you get started.