Article by: Asad Memon, FAST-NU
What is physical computing?
Physical computing is very similar to computing but you are not bounded within the hardware provided to you i.e. keyboard, monitor, mice etc.
Physical computing means building a physical system that uses both software and hardware to sense and interact with the real world. It is like building your own gadget that works how you want it to work. It can be a simple continuously blinking light or a line following robot or making a MP3 player or a complete and independent web server!
What is Arduino?
“Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It’s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board.
Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs. ”
– [Source: www.arduino.cc ]
How to get one?
You have two options; either make your own Arduino or order one. I chose to to solder my own because I could not find a vendor for Pakistan at that time, but now Creative Electron Shop is selling Arduino Duemilanove for a good price.
If you opt to make your own board, check the resource at the end of article.
Getting started
Without going into much details, let us see how Arduino works. Arduino is like a computer on which you can plug different sensors and devices and then download the code on the Arduino from your desktop computer. The code you write will decide how the device you connected should be controlled. For example, if you want an LED to blink after each second, you can do that by connecting the LED in one of the digital pins on Arduino and writing the code in the IDE provided by the Arduino website. The code for this scenario will be:
int ledPin = 13; // LED connected to digital pin 13
void setup() // run once, when the arduino starts
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}
void loop() // this run over and over again
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a second (1000 ms)
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
}
As you can see, programming the Arduino is really easy if you are familiar with the C/C++ language. After you download this code to your Arduino (through parallel, serial or USB ports), you will see that the LED at pin13 will start blinking at an interval of one second.
That’s it for now
My aim with this article was to familiarize you with Arduino, as it is widely being used by hobbyists and students worldwide to get started with physical computing. I have put up some useful tutorials on my Robotronics webpage (including a tutorial on how to solder an Arduino youself). Good Luck and happy hacking
Resources
Robotronics: www.therobotronics.co.nr
Arduino homepage: www.arduino.cc
Buy Arduino at CEShop: www.creativeelectron.net/shop
