Rawkes

Introducing Arduino: Electronics Made Easy

Arduino. If you’re like me when I first saw that word then you’ll be thinking something along the lines of, “what are you on about you crazy person?”. To be honest I’m still not entirely sure how to pronounce it, I believe it’s ar-do-ee-no. Regardless, all you need to know is that it’s a word you’ll be hearing a lot of in the near future, even if that’s all from my mouth alone.

Arduino. If you're like me when I first saw that word then you'll be thinking something along the lines of, "what are you on about you crazy person?". To be honest I'm still not entirely sure how to pronounce it, I believe it's ar-do-ee-no. Regardless, all you need to know is that it's a word you'll be hearing a lot of in the near future, even if that's all from my mouth alone.

Fantastic. But what is it exactly?

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

Official description — Arduino.cc

Put simply, Arduino has been created as an inexpensive way of making electronics available to designers and programmers at large. No longer do you need to waste money on a degree, or have a brain the size of a planet, the only requirements are a desire to learn and an ounce of patience. It would help to have a bit of programming experience but it isn't required.

Arduino Diecimila board

Arduino Diecimila board — by Randomskk

Making electronics simple is achieved through code via a framework of sorts. At the core of any Arduino project is physical board, or PCB if you know the lingo, on which the code is uploaded to from your computer. The board comes with a variety of basic features that allow you to connect individual components, upload code via USB, and extend the board with plugins called 'shields'. By removing the need for soldering and by allowing control via upload-able code, you're able to make changes quickly and often without fear of breaking anything. The fancy name for this procedure is rapid prototyping.

All code is written in the open source Arduino programming language through the Arduino IDE, a special text-editor that allows you to send code to the board. The IDE is based on the one used for Processing so you'll feel comfortable if you've used Processing in the past, if not then I can assure you it's pretty easy to use. In a nutshell, the code, or sketch, is used to manipulate connected components, both inputs [sensors] and outputs [servos, displays, etc]. If you've used a web-based programming language before then think of reading input values as like dealing with user-submitted data, and outputting as echoing, or printing, data to the browser.

Endless possibilities

Being open source and inherently easy to use makes Arduino an extremely powerful and exciting platform. I would try and list all of its possible uses but quite simply I'd run out of space, there are literally an endless amount of things you can do with it. The beauty of the platform is that all the hard stuff, the core electronics, are done for you. If you only want to turn a light on and off then you'll need a couple of components [an LED, a resistor, and some wires] and a few lines of code. On the flip-side you could make something that talks to Twitter and manipulates an object in the physical world, this would obviously take more lines of code but the electronics would still be relatively minor in comparison to working without Arduino.

Here are just a few things you can achieve with Arduino:

  • Manipulating lights [LEDs]
  • Making physical objects move [servos]
  • Using sensors to trigger actions [heat, light, movement, etc.]
  • Connecting to the internet
    • Reading data [Twitter, RSS, XML, etc.]
    • Writing data [Triggering scripts, etc.]
  • Being location aware [Using a GPS shield]

Some prerequisites

A few bits and pieces are needed before you can become an Arduino master, essentially a board and a few other components so you can actually do something interesting. I've listed my essentials below and also included a few useful components that'll come in handy, some places sell complete beginner kits that include everything you'll need for basic projects. You'll also find a list of my favourite shops that sell Arduino goodies.

Essential components

  • Arduino board (I usually go for the Duemilanove)
  • USB cable
  • Electonics breadboard (no, not the wooden thing you cut a loaf on)
  • Jumper wires

Useful to have around

  • LEDs
  • Resistors
  • Servos

Where to buy Arduino gear (UK only)

Installing the IDE and USB drivers

Before you can begin coding you need to install the Arduino IDE and USB drivers. The whole process is pretty straightforward and you can find instructions for Windows, Mac OS X, and Linux, on the official website.

Conquering the basics

So you have an Arduino board, some components, and all the necessary software installed. Now all you need is a brief understanding of the code and you're good to go.

Programming syntax

If you've any previous programming experience then learning the Arduino syntax will be water off your back. In essence the syntax is just like the majority of languages out there; you end lines with semi-colons, have conditional [if] statements, functions, variables, and the like. The main elements unique to Arduino are:

  • pinMode()—Sets a pin [component] on the Arduino board as an input [to be read from] or output [to be written to]
  • digitalRead()—Read the value of a pin [component]
  • digitalWrite()—Write a value to a pin [component]
  • delay()—Pause for a designated amount of time
  • setup()—Called once when the Arduino starts
  • loop()—Called recursively

I'll be covering the syntax in more detail in another entry but for now you can find all the basics on the official website.

Learning resources

No where is better equipped at covering everything there is to know about Arduino then the official documentation. Definitely check it out if you want to know how something works, you'll more than likely find the answer there. The official forum is also a perfect place to get help, particularly if you aren't entirely sure what's happening.

Where to from here?

By now you should have a better idea about what Arduino is and the kind of things you can do with it. If you're interested by what you've read then I strongly advise going out and buying one of the beginners kits and having a play around. I'll be writing some detailed tutorials on how to achieve particular tasks with the Arduino [manipulating LEDs and sensors, talking to Twitter, etc.] so you can always wait until then to make your mind up.

The most important thing is not being afraid of getting things wrong. Electronics has an air of difficulty associated with it and Arduino is here to change that. Components are cheap and easy to come by so get things wrong and learn from your mistakes. Most of all, have fun.


Got something to say?

Just want to share this article?