I’ve written a couple of times about Arduino on Tested—first
to explain the platform from a top-down perspective,
and then to examine the individual boards that are on the market. Before moving on to other topics, I want to take a
step-by-step look at a single Arduino project, from start to finish. By doing
this, I hope to show just how easy it is to get started with the platform.
But what to build? I wanted the project to be as simple as
possible, because I knew that I would want to explain the whole thing,
including the code, in a single article. I also wanted to avoid any specialized
hardware, since I don’t want to get bogged down describing how to incorporate a
breathalizer into your Arduino project, when that’s not going to be relevant for 99% of the
stuff you might want to try at home.
With that in mind, I decided on a chess clock. It’s the
simplest thing I could think of—just two buttons and a screen—that I could
actually get some practical usage out of. Yeah, I’m sure there’s a dozen iPhone apps
that’ll do the same job, but nothing’s as fun (and as deliciously nerdy) as an
Arduino-based do-it-yourself solution.
Part 1: Preproduction
Like with any project, a little bit of planning will make your
Arduino build go a lot smoother. A simple diagram is often all you need. Here’s
mine for the chess clock:
Obviously not a work of art. But by quickly drawing it out I
was able to figure out exactly what I’ll need for the build. First, I need an
Arduino board. I already have an Uno R3, so I’m just going to stick with that
and save some money, but you could use a Leonardo just as well. A more powerful
Arduino board like the Due would be wasted here, and a smaller board like the
Micro wouldn’t work because I plan to use a shield.
For the display, I’ll be using an LCD shield—an add-on board
that mounts directly onto the top of the Arduino Uno. It’s perfectly possible
to incorporate an LCD screen into your project without using a shield, but the
shield streamlines the process, is really easy to reuse in other projects, and
ties up fewer of the Arduino’s I/O pins than an LCD display by itself would. I
bought the 16x2 RGB LCD shield kit from
Adafruit, which comes with some onboard controls. I won’t need the controls for
this project, but I could imagine using them in the future.
Finally, I’ll need some buttons, wires, and a box. I have
plenty of the first two lying around (of course, if you don’t you can order
them online for next to nothing), and I bought a lovely plastic box to build
the project in. All the parts cost well under $100, and you can shop around for the best prices for Arduino components. Now to put it all together: