Hardware? Not So Hard


I was terrified of hardware. I'd written software for decades, but had been spooked by a coder friend with an engineering degree who said "I like software better. When you do something wrong, you get an error message instead of a tiny puff of smoke."

I wondered what it was like to build things, wire them together, "mod" them to do amazing stuff, but worried I'd fry some expensive circuit board or electrocute myself. So I stayed in my cube, pushing characters around a screen while my system administrator friends ripped open servers and poked around inside like it was no big deal.

But a single event turned it all around for me. In February of 2014, I was watching all the videos from Cascadia JS 2013, to learn more about JavaScript. Halfway through I found "So you want to build a robot?" by Raquel VĂ©lez (@rockbot). I didn't actually want to build a robot, but I watched anyway.

I challenge you to watch that video and not be completely fired-up to build robots. Impossible! Her enthusiasm and confidence made me believe I could do this stuff, too.

Of course, it's not an "intro" presentation if you've never built anything before. That would be "Where does the JavaScript run, anyway?" by C.J. Silverio (@ceejbot) from the same conference. I watched that presentation and my brain exploded.

You can build robots and run them with JavaScript? Sign. Me. Up.

The secret sauce that makes this magic possible is the johnny-five JavaScript library, created by Rick Waldron (@rwaldron), which makes talking to inexpensive, consumer-friendly devices like the Arduino as easy as using jQuery to manipulate a web page, which I actually had some experience with.

At the bottom of the johnny-five README was the "Recommended Starting Kit": the Inventor's Kit from a company called Sparkfun. I ordered it immediately.

While I waited for my kit to arrive, I researched the Arduino and the entire industry that has grown up around it.

What's an Arduino? From their website:

Arduino is an open-source electronics platform based on easy-to-use hardware and software. It's intended for anyone making interactive projects.

Sparkfun is a builder (or "maker", more on that term in a moment) paradise, with page after page of circuit boards, components and connectors of every type, along with video tutorials that demonstrate how to combine it all into cool projects.

Another company doing world-class work in the same area is Adafruit, under the leadership of Limor "Lady Ada" Fried (pronounced "freed"). I loved her presentation Why Do Open Software? (warning: contains language) on how she transitioned from MIT student to running an electronics manufacturing company in the middle of Manhattan. Adafruit has an enormous instructional video library as well, and multiple videos each week on a variety of cool topics. TheirExperimentation Kit is very similar to Sparkfun's Inventor's Kit (and slightly cheaper). Either option will get you started in style.

Adafruit and Sparkfun are core to the support system of what has become known as "The Maker Movement" or Maker culture, which embraces home-brewed robotics, 3-D printing, "modding" consumer electronics and generally making anything more awesome. In a world where most people can't change the oil in their car or assemble a bookshelf without a cheat-sheet from IKEA, Makers believe there is plenty of benefit in knowing how things work so you can take their functioning (literally) in your own hands.

A few days later, my kit finally arrived and I got to see an Arduino for real. It's a circuit board about the same footprint as a pack of cards, covered in chips, connectors and pin sockets for attaching components. Most Arduino are blue, but Sparkfun's version is fire-engine red. Also in the case was a fistful of jumper wires, servos, buzzers, colored and white LEDs, as well as a bunch of other stuff I knew nothing about.

But the best part of the kit (the same is true of Adafruit's) is the manual, which teaches you -- project by project -- how to get started making. The examples expect you to use the Arduino's built-in language, but getting them going with johnny-five was a piece of cake.

The "Hello World" of Arduino hacking is blinking an LED, but I rapidly moved on to spinning motors and even jamming some Black Sabbath!

Make: magazine is the place to find even more cool articles and now entire books on making all sorts of things that were unimaginable even a few short years ago. Two great examples are Invent To Learn: Making, Tinkering and Engineering in the Classroom and Zero to Maker, which is essentially a turbo-charged version of this article, the story of how David Lang went from no knowledge of hardware to helping build robot submarines. Too cool.

Over time, I've replaced my fear of hardware with a deep appreciation of how much fun it can be to apply a love of programming to things that exist in the real world, from LEDs to robot arms to JavaScript-controlled semi-autonomous quadcopter drones.

So go forth. Make something.