The Arduino Microcontroller - An IntroductionPosted by Rudolph on Monday, 7 April 2008
The Arduino is a microcontroller prototyping platform. This platform includes the hardware device, built around the Atmel ATmega168 microcontroller, and an easy-to-use cross-platform IDE (Integrated Development Environment) using a C-style programming syntax. Apparently intended for a Physical Computing audience, the Arduino should also be an easy way of adding a bit of extra "smarts" to simple robotics projects.
Before getting into the good stuff, a little bit about who I am and why I'm here, followed by what you can expect to glean from this small series of articles.
In real life I am a cabinet maker. Not an electronics engineer, not a roboticist, I don't have a degree in anything. Just a regular Joe who likes fiddling with things, taking things apart, building things, breaking things. I've been interested in general robotics for many years, mostly for their entertainment value. After playing with various Wowwee products I finally convinced myself it would be fun to design and build my own toy robot. Not "better" than any current toy robot offerings, just different. Having played a bit with BEAM robotics I knew I wanted a little more "intelligence" in my toy, so the obvious solution was to use some kind of microcontroller.
I'm not going to go into great detail about how to choose a microcontroller, that topic has been well covered elsewhere. After reading a lot about the various micros out there, I finally decided I'd start with the Arduino prototyping and development platform.
- Arduino's ease of use on various platforms. The Arduino IDE works on Windows, Mac, and Linux. Making it work on my Ubuntu computers was painless, even brainless. I'm just a sucker for plug-n-play.
- Arduino's programming syntax is based on C. I haven't even looked at BASIC since the late '80's (BASIC Stamp). I didn't really want to learn a new language (Spin). With my recent background being in Perl and PHP, writing for the micro in a C style just made sense to me.
- Since the Arduino is built around an AVR chip, if/when I decide I've "outgrown" the Arduino I should be easily able to transition to the use of the AVR directly, working the chip into my project(s) without the need for the prototyping board.
What I hope to present here are the details of my learning about the Arduino and how to use it. Not really a tutorial, more of a "what I did and how I did it" type of thing. We'll start off with some absolute basics and hopefully end up with a fully functioning (yet fairly simple) semi-autonomous walking robot.
If you don't already have an Arduino, well, you'll kinda need one in order to play along at home. I recommend AdaFruit, SparkFun and several other places have them as well. You should probably get a breadboard too if you don't already have one. Finally, it never hurts to have a bin of electronic doodads at your disposal; resistors, leds, buttons, etc...
Still with me? You are? Okay, I guess I'll go ahead and type up Part Two, the "Hello World" of electronics, the ubiquitous flashing LED! *oooh, aaah*