The Arduino Way
If you have been following this series, then prepare for
a bit of Workshop whiplash. Up to this point, we have
learned how to program the AVR Butterfly using the C
programming language with the WinAVR GCC compiler
toolset and AVRStudio. Now, just when you think we
would start learning more about the underlying AVR and
doing more hardware oriented projects (like I promised),
we are going to go off the rails, throw the gears in reverse,
and accelerate backwards to the beginning so that we can
learn an entirely new system: the Arduino Duemilanove
(Italian for 2009).
This wasn’t exactly according to plans, but as Robert
Burns said: “The best laid schemes o’ Mice an’ Men, gang
aft agley.” And — while I can only hope that “gang aft agley,”
is what an 18th century Scotsman says when he means: ‘go
often astray’ — just accept that I too am continuing to learn
and occasionally plowing up a mouse in the process. One
of the things that I learned in the midst of this Workshop
series is that the Arduino is a darn good system for beginners
and is even simpler than the Butterfly for the complete
novice to use. I decided to insert a couple of Workshops
to bring the reader up to speed with the Arduino and then
get back on the rails and use both the Butterfly and the
Arduino in subsequent workshops where we will — I promise
(and this time I mean it) [really] — start learning more about
the AVR hardware. And don’t worry about all those brain
■FIGURE 1. The Arduino Duemilanove.
Follow along with this series!
Joe’s book & kits are available in our
webstore at www.nutsvolts.com
by Joe Pardue
cells you’ve used up learning C, the Arduino uses C. It just
does a real good job of hiding that fact from the casual user.
Restarting the Workshop
So, bear with me for this article since I am going
to pretend that you, dear reader, wouldn’t know a
microcontroller if one bit you on the butt — it is not that
I want to talk down to you — it is because the ‘Arduino
Way’ was developed for total absolute novices.
Massimo Banzi begins his book, Getting Started with
Arduino, “A few years ago, I was given the very interesting
challenge: teach designers the bare minimum in electronics
so that they could build interactive prototypes of the objects
they were designing.” He summarizes his philosophy of
‘learning by tinkering’ with a quote from www.exploratorium.
edu/tinkering: “Tinkering is what happens when you try
something you don’t quite know how to do, guided by whim,
imagination, and curiosity. When you tinker, there are no
instructions — but there are also no failures, no right or
wrong ways of doing things. It’s about figuring out how
things work and reworking them.” Arduino provides a great
toolset for designers, tinkers, and even some of us surly old
engineers who sometimes just want to play with an idea.
The genius of Arduino is that it provides just enough
access to get specific tasks done without exposing the
underlying complexities that can be truly daunting for
folks new at this stuff.
A Few Definitions
• Sensor — A computer-controlled mechanism that
measures or detects events in the real world such as
motion, light, or voltage. For example, an IR optical
sensor used to detect the motion of a computer mouse.
• Actuator — A computer controlled mechanism that
causes a device to be turned on or off, adjusted, or
moved. For example, the devices that spin a DVD, move
the sensing head, and turn the read/write laser on/off.
• Micro (microcontroller) — A single integrated circuit
that contains a computer, memory, and peripherals
used with sensors and actuators to provide control of
real-world events. For example, an AVR such as the
ATmega168 can be used to sense button presses, motor