Easy Application Deployment Using Soldering and Jack Cords

| | Comments (1)

T'was some day in Noctember, the year was 2007 and the Praized dev. team was hacking away with no mercy at defenseless lines of rails code; showing no pity for the agile little framework. At the same time, an intricate network of micro-conversations was sporadically chittering accross the room's acoustics when at some point: an idea evolved!

(p)ra(i)zed_hax.jpg

THE SETUP

The "Easy" button1 : bastard child of many a pointless hacks. Anyone who's anyone that knows someone who shops at Staples has obviously been introduced to this little gizmo one way or the other. What if.... what if we could hack it and somehow make it so that when pressed upon, a mad fury of rails deployment scripts were unleashed? Thus was the concept that had evolved through the chit-chat which prompted this Geek to acquire a new set of skills, namely: soldering and hardware hacking.

So, off I went to learn the basics of soldering through a series of tubes. After that — and a short trip to an electronics store — I was finally ready to get ready to ready myself to start.

Before I get started on the intricacies of my adventure I must warn you: I'm a front end developer with very limited knowledge of electronics, so If you're a veteran soldering soldier or a l33t b33t electronics g33k, this post may come off as a very hilarious joke (the type that make you ROTFLMAO).

THE INGREDIENTS

  1. soldering kit
  2. USB Keyboard (I used an old Apple Pro)
  3. "Easy" button(s)
  4. 1/4 jack cord(s)
  5. wire
  6. a patient and understanding "Geekette" willing to lend a helping hand
  7. a roommate who knows more about electronics than you do (optional)
  8. a pritty wittle box to hold the stuff together
  9. a laptop
  10. some diodes2

THE RECIPE

1. Destroy! Destroy!

The first part of this hack is the geek's equivalent of smashing down some drywall for indoor remodeling: you have to carefully take apart your keyboard without killing the internal organs. It was a pretty lengthy process for me because at some point in their untold "Hardware Hacking Design Guidelines", Apple decided it would be a nice idea to use like 50+ screws. So anyways, here are a couple pictures detailing the procedure... I wont go through all the details on how to tear down a keyboard because I'm pretty sure if you've read up to here, you've had your share of experience unmounting Ikea stuff. The best advice I can give you is to keep all the little screws and bolts in some container for eventual hacks.

button1.jpgbutton2.jpglayer0.jpglayer1.jpglayer4.jpg

2. Mapping the Darned Thing.

In the original version of this hack, the guy had the ingenious idea of NOT using an Apple Pro keyboard, which must have made his life much easier. Seeing as I went with what I had in stock, I had to figure my way to what was connecting to what and which character (that's when ingredient #6 comes in handy). The idea was to figure out where I could solder some wires to the board in order to simulate a keypress; With a wire in hand, I plugged the board into my MacBook Pro, opened up the Keyboard viewer3 and started connecting nodes with the wire to see what would happen (that's when ingredient #6 comes in really really handy).

After a couple hours of playing around with the connections, we were able to map approximately 90% of the keyboard — even though I only needed/wanted a couple . This was enough for me to hook up 3 "Easy" buttons that would trigger ctrl+F1,ctrl+F5,ctrl+F6 through their respective jack inputs.

Now, you might have been (mis)lead into believing there is some high level of thinking that went into this particular selection of key-triggers, but there's not. The truth behind the matter is that I ruined a couple "connectors" as I was learning how to solder and consequently rendered them unusable. This is a good thing to know: it shows that you can screw up at least a dozen times (seven) and still make this work, you can learn how to solder with the real thing instead of a dummy board and it also goes to prove that mapping 90% of the keys wasn't entirely useless.

Here's a couple totally irrelevant pictures of the process. If anyone wants a PDF of the key mapping relative to the connectors on the plate (of an old Apple Pro Keyboard), I would be happy to provide them if you, in turn, write a good comment at the bottom of this post just to give me a little incentive and motivation (because the PDF is only half done).

acetate2board_conn.jpg IMG_0899.JPG

3. The "Easy" Part

Attaching a 1/4" jack to the easy button was pretty much easy. Not much trouble here, you just have to take out the batteries, remove the little rubber pieces from the bottom to uncover the screws, take out a thingy and solder a couple wires. As detailed (very poorly) in the following pictures...

easy_soldered.jpgIMG_0897.JPGIMG_0898.JPG

4. Schematics, shnematics! I'm doodlin' wires!

Seeing as my lesson in basic electronics dates back to about 8 years, my first attempt at hooking everything up was a miserable failure. The fact that I had to use the same wire for the ctrl character for every button, and the fact that I just split the wire in three made it so that when a button was pushed down: the current would flow through all the wires and press every single character at the same time (I'm a n00b).This is the part where I had to delegate an essential aspect of my mission to the oh-so-clever ingredient #7; which consequently, lead to my learning about ingredient #10...

Diodes, which are not to be confused with Ronnie James Dio4, are (as said on wiktionary): "An electronic device that allows current to flow in one direction only; a valve". This is exactly what I needed! So without further delay, here is the layman's schematic of the wiring:

dio-gram.gif

PURTYNESS IS IN THYNE EYE OF THY BEHOLDERERZ!

Well, now that you've read all the way down to here expecting a thoroughly detailed explanation of the entire intricate process and have found yourself even more confused than that first day at that international school where everyone spoke a language you didn't understand and started running with frantic looks on their faces and climbing walls and stuff... Now that you've gotten this far and burnt your kitchen table with soldering irons and figured out the entire "hack" by yourself because of my lame explanation... Now that — well, you get the picture; I'm happy to announce that the final steps of the hack are all yours to re-write!

What I did though, was get this nifty little wooden box, borrowed a drill (btw Steph, remind me about bringing back your drill) to get some holes in for the jack inputs, got meeself some purtyfiers for the box, weights, rubber pads, and a couple events later... I came up with this little sucker:

easy_button.JPG

Now aint that grand? Ain't she a beaut'? I'm-a name her "Darlene" <awr shucks>!!!

CONCLUSIZION.... R00LES THE NATION! (vocoder)

The last step can be anything you want. You've basically got yourself a USB keyboard and you can map the entire thing with "Easy" buttons if you have that kind of budget. Then it's just a matter of (on a mac) System Prefferences→Keyboard & Mouse→Keyboard Shortcuts→click the little plus, and map a script to those combinations! Or maybe you can use some Quicksilver triggers, or maybe you have enoguh skills to bind a script directly to that USB port's inputs or whatever.

Our original concept was to "hook these up to some capistrano tasks" but who knows, maybe we'll do something else. The important part is that we've got the gizmo, it's just a matter of hooking it up now! I'll make sure we post a short follow-up on what we did and how/if we actually did use this as an application deployment gizmo... well that's it! As that forest creature would say in Sierra's "Hero's Quest": Tah-Tah!

Attribution: Most of this hack was shamelessly copied off of this one , thanks Jro !



1 For those rare few that would be unfamiliar with this, it's a big fat red button that says "Easy" across it and speaks a (not very) relieving "That was easy" affirmation when pressed upon, in a (not very) soothing voice.

2 I used 1N914 Type Diodes.

3 Mac: System Preferences→International→Keyboard Viewer.

4 I do recommend kickin some old school Black Sabbath to ease the entire process (http://www.ronniejamesdio.com/)

1 Comments

Your wooden box has style!
If it wasn't for the Easy button itself, it would almost looks steampunk.

About this Entry

This page contains a single entry by François published on March 3, 2008 10:22 PM.

Inside Joke: The Kickin Chickin! was the previous entry in this blog.

Long Live Gary Gygax! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.1