Wednesday, September 14, 2011

| By: Ashraff


Arduino is an open-source single-board microcontroller, and a physical computing platform based on a simple i/o board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on computer.

Arduino is an awesome tool for physical computing -- it's an open source microcontroller board, plus a free software development environment which can be used it to make cool interactive objects that can sense inputs from switches, sensors, and computers, and then control motors, lights, and other physical outputs in the real world.

The hardware consists of a simple open hardware design for the Arduino board with an Atmel AVRI/O support. The software consists of a standard programming language compiler and the boot loader that runs on the board processor and on-board. 

Arduino can sense the environment by receiving input from a variety of sensors and can affect its surroundings by controlling lights, motors, and other actuators. The microcontroller on the board is programmed using the Arduino programming language (based on Wiring) and the Arduino development environment (based on Processing). Arduino projects can be stand-alone or they can communicate with software running on a computer (e.g. Flash, Processing, MaxMSP). 

The boards can be built by hand or purchased preassembled; the software can be downloaded for free. The hardware reference designs (CAD files) are available under an open-source license, you are free to adapt them to the needs. 

Arduino received an Honorary Mention in the Digital Communities section of the 2006 Ars Electronica Prix. The Arduino team is: Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca Martino, and David Mellis. Credits


The project began in Ivrea, Italy (a town that, as the site of Olivetti, hosted a high concentration of IT professionals), in 2005 to make a device for controlling student-built interaction design projects less expensively than other prototyping systems available at the time. As of February 2010 more than 120,000 Arduino boards had been shipped.[6] Founders Massimo Banzi and David Cuartielles named the project after Arduin of Ivrea, the main historical character of the town.[7] "Arduino" is an Italian masculine first name, meaning "strong friend". The English version of the name is "Hardwin".[8]
The Arduino project is a fork of the open-source Wiring Platform. Wiring was created by Colombian artist and programmer Hernando Barragán as a master's thesis at the Interaction Design Institute Ivrea, under the supervision of Massimo Banzi and Casey Reas. Conversely, Wiring is based on Processing and its integrated development environment created by Casey Reas and Ben Fry.[9]

Arduino was built around the Wiring project of Hernando Barragan. Wiring was Hernando's thesis project at the Interaction Design Institute Ivrea. It was intended to be an electronics version of Processing that used our programming environment and was patterned after the Processing syntax. It was supervised by myself and Massimo Banzi, an Arduino founder. I don't think Arduino would exist without Wiring and I don't think Wiring would exist without Processing. And I know Processing would certainly not exist without Design By Numbers and John Maeda.[1]



An Arduino board consists of an 8-bit Atmel AVR microcontroller with complementary components to facilitate programming and incorporation into other circuits. An important aspect of the Arduino is the standard way that connectors are exposed, allowing the CPU board to be connected to a variety of interchangeable add-on modules (known as shields). Official Arduinos have used the megaAVR series of chips, specifically the ATmega8, ATmega168, ATmega328, ATmega1280, and ATmega2560. A handful of other processors have been used by Arduino compatibles. Most boards include a 5 volt linear regulatorcrystal oscillator (or ceramic resonator in some variants), although some designs such as the LilyPad run at 8 MHz and dispense with the onboard voltage regulator due to specific form-factor restrictions. An Arduino's microcontroller is also pre-programmed with a boot loader that simplifies uploading of programs to the on-chip flash memory, compared with other devices that typically need an external chip programmer. and a 16 MHz
At a conceptual level, when using the Arduino software stack, all boards are programmed over an RS-232TTL-level signals. Current Arduino boards are programmed via USB, implemented using USB-to-serial adapter chips such as the FTDIBluetooth or other methods. (When used with traditional microcontroller tools instead of the Arduino IDE, standard AVR ISP programming is used.) serial connection, but the way this is implemented varies by hardware version. Serial Arduino boards contain a simple inverter circuit to convert between RS-232-level and FT232. Some variants, such as the Arduino Mini and the unofficial Boarduino, use a detachable USB-to-serial adapter board or cable,
The Arduino board exposes most of the microcontroller's I/O pins for use by other circuits. The Diecimila, now superseded by the Duemilanove, for example, provides 14 digital I/O pins, six of which can produce PWM signals, and six analog inputs. These pins are on the top of the board, via female 0.1 inch headers. Several plug-in application "shields" are also commercially available.


The Arduino IDE is a cross-platform application written in Java, and is derived from the IDE for the Processing programming language and the Wiring project. It is designed to introduce programming to artists and other newcomers unfamiliar with software development. It includes a code editor with features such as syntax highlighting, brace matching, and automatic indentation, and is also capable of compiling and uploading programs to the board with a single click. There is typically no need to edit makefiles or run programs on the command line.
The Arduino IDE comes with a C/C++ library called "Wiring" (from the project of the same name), which makes many common input/output operations much easier. Arduino programs are written in C/C++, although users only need define two functions to make a runnable program:
  • setup() – a function run once at the start of a program that can initialize settings
  • loop() – a function called repeatedly until the board powers off


The Arduino development environment contains a text editor for writing code, a message area, a text console, a toolbar with buttons for common functions, and a series of menus. It connects to the Arduino hardware to upload programs and communicate with them.
Software written using Arduino are called sketches. These sketches are written in the text editor. It has features for cutting/pasting and for searching/replacing text. The message area gives feedback while saving and exporting and also displays errors. The console displays text output by the Arduino environment including complete error messages and other information. The toolbar buttons allow you to verify and upload programs, create, open, and save sketches, and open the serial monitor:
Checks your code for errors.
Stops the serial monitor, or unhighlight other buttons.
Creates a new sketch.
Presents a menu of all the sketches in your sketchbook. Clicking one will open it within the current window.

Note: due to a bug in Java, this menu doesn't scroll; if you need to open a sketch late in the list, use the File | Sketchbook menu instead.
Saves your sketch.
Upload to I/O Board
Compiles your code and uploads it to the Arduino I/O board. See uploading below for details.
Serial Monitor
Opens the serial monitor.
Additional commands are found within the five menus: File, Edit, Sketch, Tools, Help. The menus are context sensitive which means only those items relevant to the work currently being carried out are available.


  • Copy for Discourse
    Copies the code of your sketch to the clipboard in a forum suitable for posting to the forum, complete with syntax coloring.
  • Copy as HTML
    Copies the code of your sketch to the clipboard as HTML, suitable for embedding in web pages.


  • Verify/Compile
    Checks your sketch for errors.
  • Import Library
    Adds a library to your sketch by inserting #include statements at the code of your code. For more details, see libraries below.
  • Show Sketch Folder
    Opens the sketch folder on the desktop.
  • Add File...
    Adds a source file to the sketch (it will be copied from its current location). The new file appears in a new tab in the sketch window. Files can be removed from the sketch using the tab menu.


  • Auto Format
    This formats your code nicely: i.e. indents it so that opening and closing curly braces line up, and that the statements instead curly braces are indented more.
  • Board
    Select the board that you're using. See below for descriptions of the various boards.
  • Serial Port
    This menu contains all the serial devices (real or virtual) on your machine. It should automatically refresh every time you open the top-level tools menu.
  • Burn Bootloader
    The items in this menu allow you to burn a bootloader onto the microcontroller on an Arduino board. This is not required for normal use of an Arduino board but is useful if you purchase a new ATmegaBoards menu before burning the bootloader. When using an AVR ISP, you'll need to select the item corresponding to your programmer from the Serial Port menu.
    (which normally come without a bootloader). Ensure that you've selected the correct board from the


The Arduino environment includes the concept of a sketchbook: a standard place to store your programs (or sketches). The sketches in your sketchbook can be opened from the File > Sketchbook menu or from the Open button on the toolbar. The first time you run the Arduino software, it will automatically create a directory for your sketchbook. You can view or change the location of the sketchbook location from with the Preferences dialog.

Tabs, Multiple Files, and Compilation

Allows you to manage sketches with more than one file (each of which appears in its own tab). These can be normal Arduino code files (no extension), C files (.c extension), C++ files (.cpp), or header files (.h).


Before uploading your sketch, you need to select the correct items from the Tools > Board and Tools > Serial Port menus. The boards are described below. On the Mac, the serial port is probably something like /dev/tty.usbserial-1B1 (for a USB board), or /dev/tty.USA19QW1b1P1.1 (for a serial board connected with a Keyspan USB-to-Serial adapter). On Windows, it's probably COM1 or COM2 (for a serial board) or COM4, COM5, COM7, or higher (for a USB board) - to find out, you look for USB serial device in the ports section of the Windows Device Manager. On Linux, it should be /dev/ttyUSB0, /dev/ttyUSB1 or similar.
Once you've selected the correct serial port and board, press the upload button in the toolbar or select the Upload to I/O Board item from the File menu. Current Arduino boards will reset automatically and begin the upload. With older boards that lack auto-reset, you'll need to press the reset button on the board just before starting the upload. On most boards, you'll see the RX and TX LEDs blink as the sketch is uploaded. The Arduino environment will display a message when the upload is complete, or show an error.
When you upload a sketch, you're using the Arduino bootloader, a small program that has been loaded on to the microcontroller on your board. It allows you to upload code without using any additional hardware. The bootloader is active for a few seconds when the board resets; then it starts whichever sketch was most recently uploaded to the microcontroller. The bootloader will blink the on-board (pin 13) LED when it starts (i.e. when the board resets).


Libraries provide extra functionality for use in sketches, e.g. working with hardware or manipulating data. To use a library in a sketch, select it from the Sketch > Import Library menu. This will insert one or more #include statements at the top of the sketch and compile the library with your sketch. Because libraries are uploaded to the board with your sketch, they increase the amount of space it takes up. If a sketch no longer needs a library, simply delete its #include statements from the top of your code.
There is a list of libraries in the reference. Some libraries are included with the Arduino software. Others can be downloaded from a variety of sources. To install these third-party libraries, create a directory called libraries within your sketchbook directory. Then unzip the library there. For example, to install the DateTime library, its files should be in the /libraries/DateTime sub-folder of your sketchbook folder.
To write your own library, see this tutorial.

Third-Party Hardware

Support for third-party hardware can be added to the hardware directory of your sketchbook directory. Platforms installed there may include board definitions (which appear in the board menu), core libraries, bootloaders, and programmer definitions. To install, create the hardware directory, then unzip the third-party platform into its own sub-directory. (Don't use "arduino" as the sub-directory name or you'll override the built-in Arduino platform.) To uninstall, simply delete its directory.
For details on creating packages for third-party hardware, see the platforms page on the Google Code developers site.

Serial Monitor

Displays serial data being sent from the Arduino board (USB or serial board). To send data to the board, enter text and click on the "send" button or press enter. Choose the baud rate from the drop-down that matches the rate passed to Serial.begin in your sketch. Note that on Mac or Linux, the Arduino board will reset (rerun your sketch from the beginning) when you connect with the serial monitor.
You can also talk to the board from Processing, Flash, MaxMSP, etc (see the interfacing page for details).


Some preferences can be set in the preferences dialog (found under the Arduino menu on the Mac, or File on Windows and Linux). The rest can be found in the preferences file, whose location is shown in the preference dialog.


The board selection has two effects: the parameters (e.g. CPU speed and baud rate) used when compiling and uploading sketches; and the file and fuse settings used by the burn bootloader command. Some of the board definitions differ only in the latter, so even if you've been uploading successfully with a particular selection you'll want to check it before burning the bootloader.
  • Arduino Uno
    An ATmega328 running at 16 MHz with auto-reset, using the optiboot bootloader (115200 baud, 0.5 KB).
  • Arduino Duemilanove or Nano w/ ATmega328
    An ATmega328 running at 16 MHz with auto-reset.
  • Arduino Diecimila, Duemilanove, or Nano w/ ATmega168
    An ATmega168 running at 16 MHz with auto-reset. Compilation and upload is equivalent to Arduino NG or older w/ ATmega168, but the bootloader burned has a faster timeout (and blinks the pin 13 LED only once on reset).
  • Arduino Mega 2560
    An ATmega2560 running at 16 MHz with auto-reset, using an stk500v2 bootloader.
  • Arduino Mega (ATmega1280)
    An ATmega1280 running at 16 MHz with auto-reset.
  • Arduino Mini
    Equivalent to Arduino NG or older w/ ATmega168 (i.e. an ATmega168 running at 16 MHz without auto-reset).
  • Arduino Fio
    An ATmega328 running at 8 MHz with auto-reset. Equivalent to Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328.
  • Arduino BT w/ ATmega328
    running at 16 MHz. The bootloader burned (4 KB) includes codes to initialize the on-board bluetooth module.
  • Arduino BT w/ ATmega168
    running at 16 MHz. The bootloader burned includes codes to initialize the on-board bluetooth module.
  • LilyPad Arduino w/ ATmega328
    An ATmega328 running at 8 MHz (3.3V) with auto-reset. Equivalent to Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328.
  • LilyPad Arduino w/ ATmega168
    An ATmega168 running at 8 MHz. Compilation and upload is equivalent to the Arduino Pro or Pro Mini (8 MHz) w/ ATmega168. The bootloader burned, however, has a slower timeout (and blinks the pin 13 LED three times on reset) because the original versions of the LilyPad didn't support auto-reset. They also didn't include an external clock, so the burn bootloader command configures the fuses of ATmega168 for an internal 8 MHz clock.

    If you have a recent version of the
    LilyPad, (w/ a 6-pin programming header), you'll want to select Arduino Pro or Pro Mini (8 MHz) w/ ATmega168 before burning the bootloader.
  • Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
    An ATmega328 running at 16 MHz with auto-reset. Equivalent to Arduino Duemilanove or Nano w/ ATmega328.
  • Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168
    An ATmega168 running at 16 MHz with auto-reset. Equivalent to Arduino Diecimila, Duemilanove, or Nano w/ ATmega168.
  • Arduino Diecimila, Duemilanove, or Nano w/ ATmega168
    An ATmega168 running at 16 MHz with auto-reset. Compilation and upload is equivalent to Arduino NG or older w/ ATmega168, but the bootloader burned has a faster timeout (and blinks the pin 13 LED only once on reset). Also used for the 16 MHz (5V) versions of the Arduino Pro and Pro Mini with an ATmega168.
  • Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328
    An ATmega328 running at 8 MHz (3.3V) with auto-reset. Equivalent to LilyPad Arduino w/ ATmega328.
  • Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega168
    An ATmega168 running at 8 MHz (3.3V) with auto-reset.
  • Arduino NG or older w/ ATmega168
    An ATmega168 running at 16 MHz without auto-reset. Compilation and upload is equivalent to Arduino Diecimila or Duemilanove w/ ATmega168, but the bootloader burned has a slower timeout (and blinks the pin 13 LED three times on reset).
  • Arduino NG or older w/ ATmega8
    An ATmega8 running at 16 MHz without auto-reset. 

For more details on arduino, tutorials and projects related to it, visit:


gvrk said...

can u short it for me dude and is the word verification is necessary

^ Go to Top