ARDU: Physical Computing with Arduino – An Introduction

Filed in AVR , Articles , CEShop 14 comments

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 ]

Arduino with pins and components labeled.

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

Posted by hamzaazeem   @   5 July 2010 14 comments
Tags : , , ,

Share This Post

RSS Digg Twitter StumbleUpon Delicious Technorati

14 Comments

  • @Saad:
    Yes atmega is really hard to find around here but try your luck at Axis Electronics in Saddar, Karachi (wwww.axiselectronic.com). I bought some for myself from them. Do update here if they have/don't have the chips.

  • Hey thanks for the reply Asad I did get the atmega168 them though not from axis electronics but from sigma, went to axis a few weeks asked about it they only had atmega8's kept on telling me that 168 will be coming in soon. Got them around a month back.

  • Thanks for the love guys... Hope that this article will help the locals a bit in getting hold of latest electronic prototyping methods used around the world.

  • Saad

    Good article, nice to see that people in pakistan are also using this platform since the whole world is using it. I want to make my own, i got all the parts for the build except i couldn't find the brain of the project the atmega328 or 168 in the market, could you guide me to obtaining the microcontroller so i could finally start working on it. Thanks

  • Hitman_4770

    you can obtain from lahore hall road

blog comments powered by Disqus
Previous Post
«
Next Post
»