Rules are rules, but not for Arduino boards that are open-source platforms with modular design and perhaps the most popular electronic boards used in robotics and many other fields. Based on a simple I/O board and an advanced development environment, Arduino is an open-source computing platform with the Atmel microcontroller technology incorporated.
With a considerable community in the hobbyists and professional users, Arduino offers free development software and hardware components at an affordable price. From simple to complex robots, Arduino can be used for almost anything including taking inputs from a wide range of sensors, interaction with objects, and control a variety of motors and actuators.
The Arduino software runs on most popular operating systems including Linux, Windows, and Mac OS X. Simple, easy to use and friendly interface, the Arduino programming environment was built to be used by advanced users as well as beginners while offer the possibility to be expanded by writing C++ libraries.
Divided into several categories including how to setup Arduino boards, programming tutorials and resources, this article aiming to help beginners and advanced users to start programming or increase the knowledge in programming Arduino boards.
Table of Contents
ToggleStarting With Arduino
Easy to use and open-source are two features integrated in one family, the family of Arduino boards. All of these boards are designed for everyone from hobbyists to professional users. In the following are listed all Arduino boards available on the market, description of USB cables compatible with Arduino ports, Arduino software IDE, and tutorials to the setup Arduino IDE on different operating systems.
Arduino versions
From Uno to Leonardo and Mini, Arduino is available in different versions and different sizes to fit in any robotic project.
In the following are listed all Arduino boards designed to be used in different electronic projects especially in robotics.
- Arduino Uno – Uno is the first and perhaps the most popular Arduino board. Uno is based on ATmega328 microcontroller and it has 14 digital input/output pins;
- Arduino Leonardo -based on ATmega32u4 microcontroller, Leonardo is based on the same concept for Arduino boards and has 20 digital input/output pins;
- Arduino Due– Due is based on Atmel SAM3X8E ARM Cortex-M3 CPU and has 54 digital input/output pins;
- Arduino Esplora– derived from Arduino Leonard, Esplora uses an Atmega32U4 AVR microcontroller;
- Arduino Robot – with rounded shape Robot board is based on ATmega32u4 microcontroller, has 5 digital I/O pins and 8 analog I/O pins;
- Arduino Mega 2560– based on ATmega2560, Mega 2560 has 54 digital I/O pins;
- Arduino BT – Arduino BT or Arduino Bluetooth is a board based on ATmega328 with 14 digital I/O pins and 6 analog input pins;
- Arduino Micro– Micro is based on ATmega32u4 microcontroller and has 20 digital input/output pins;
- Arduino Nano – Nano is based on ATmega328 or ATmega168 for version 2.x and has 14 digital I/O pins while analog input pins are in number of 8;
- Arduino Pro – depending on version Pro is based on ATmega168 or ATmega328 with 14 digital I/O pins and 6 analog input pins;
- Arduino Fio – based on ATmega328P microcontroller, Fio has available 14 digital I/O pins while for analog inputs are available 8 pins;
- Arduino Mini – Mini is based on ATmega328, has 14 digital I/O pins and 8 analog input pins;
USB cable
USB cable A-B or A-A to connect the Arduino board to your PC.
A USB cable is required to connect the Arduino board with your PC. This is not a special cable, Arduino uses simple standard A-B USB cable or A-A USB cable. Before buying USB cable, you have to check what type of cable your Arduino board can support. This type of cable could be purchased from almost any electronics magazine, in the following I share some links from where the USB cables could be purchased.
Standard A – B cable
- Adafruit – USB Cable – 10″ Standard A-B;
- Walmart – Cables To Go 16′ USB 2.0 A/B Cable, White;
- Sky-Probe – USB Cable – Standard A-B – 3ft;
- Aatapro – USB 2.0 A-to-B Device Cable;
- Radioshack – Cables to Go 6.6-Ft. USB 2.0 A/B Cable;
- L-com – Premium USB Cable Type A – B Cable, 0.5m;
Standard A – A cable
- Amazon – SANOXY USB Type A Male / Type A Male Cable, 2.0 Version, Black, 6 ft;
- Parts-Express – C2G 54170 USB 3.0 A Male to A Male Cable 3.3 ft.;
- Officedepot – C2G USB 2.0 A Male to A Male Cable;
- Ebay – 2 Pack 6Ft 6FEET USB2.0 Type A Male to Type A Male Cable Cord (U2A1-A1-06-2PK);
- Cablestogo – 2m USB 2.0 A Male to A Male Cable – Black (6.5ft);
Arduino software
Written in Java, Arduino software can be downloaded for Linux, Windows, and Mac OS X for free.
Arduino makes things easier by releasing the environment with full Arduino support for writing code and uploading the code into the board memory. Software available is compatible with Linux, Windows and Mac OS X operating systems. There are many software versions released in time with new and new features aiming to create a friendly environment to develop from simple to advanced Arduino applications. Written in Java, Arduino software can be downloaded free on many operating systems platforms.
Setup Arduino on Your PC
Three main operating systems – Linux, Windows, and Mac OS X – and three different ways to setup the Arduino board.
Linux, Windows, or Mac OS X are three of the most used operating systems around the world. All these three operating systems are also used to develop robotic applications. Before starting writing programming lines for Arduino boards, you have to connect the board to your PC. Below is a list with tutorials that explain in steps how to setup the Arduino boards on different operating systems.
Setup Arduino on Linux
- Complete Numpties Guide to Arduino on Ubuntu 32 & 64 bit – step by step tutorial how to setup Arduino board on Linux Ubuntu 32 and 64 bits;
- Install Arduino on Ubuntu Linux – tutorial how to install Arduino IDE on Linux Ubuntu;
- Installing the Arduino IDE on Linux Mint – simple tutorial that describe the installation process of Arduino IDE on Linux Mint;
- CodeBlocks Arduino IDE – an alternative of Arduino IDE for Linux users and with enhancement for Arduino development;
- Eclipse IDE for AVR and Arduino – tutorial how to integrate Eclipse for Arduino and start to built the first application;
Setup Arduino on Windows
- Arduino Tutorial – step by step tutorial from setup to start using Arduino IDE;
- How to Install the Arduino IDE for Windows – tutorial with five main parts from downloading the Arduino software and to start programming the first application;
- Arduino development with Eclipse – A step by step tutorial to the basic setup – step by step tutorial how to integrate Eclipse with Arduino board for Windows operating system;
- Welcome to the Arduino Eclipse installation page – comprehensive tutorial to setup Eclipse IDE with Arduino board and start build advanced robotic applications;
- CodeBlocks Arduino IDE – complete tool for code developing, as well compiling and uploading the code into the Arduino board;
- Meet MariaMole, an Arduino IDE for advanced developers – if you’re using Windows to develop Arduino applications, MariaMole is perhaps the most advanced Arduino IDE that can be used by advanced developers;
- Tutorial: Using Atmel Studio 6 with Arduino projects – Arduino boards are based on Atmel technology. This tutorial explain how Atmel Studio 6 software can be used in Arduino based projects ;
Setup Arduino on Mac
- Getting Started With Your Arduino Starter Kt – tutorial to setup Arduino IDE on Mac OSX as well on Windows 7;
- Arduino Eclipse Development Environment for Mac OS- – step by step guide to setup Eclipse for Arduino board on Mac OSX;
Programming Arduino – Examples
Line by line Arduino board interpret the code and execute the instructions in accordance with the conditions. From educational to hobbyists’ purposes, the board represents the LEGO concept in electronics. Tutorials with programming lines for beginners to advanced users are available in the following.
Sample C++ code for Arduino board
void loop(){ changeLights(); delay(15000); } void changeLights(){ // green off, yellow for 3 seconds digitalWrite(green,HIGH); digitalWrite(yellow,LOW); delay(3000); // turn off yellow, then turn red on for 5 seconds digitalWrite(yellow,LOW); digitalWrite(red,HIGH); delay(5000); // red and yellow on for 2 seconds (red is already on though) digitalWrite(yellow,HIGH); delay(2000); // turn off red and yellow, then turn on green digitalWrite(yellow,LOW); digitalWrite(red,LOW); digitalWrite(green,HIGH); }
- Arduino Programming For Beginners: The Traffic Light Controller;
- How to Start Making Your Own Electronics with Arduino and Other People’s Code;
- Beginning Arduino (Ports, Pins and Programming);
- Arduino Programming Guide on pcDuino;
- Building an Arduino Robot, Part II: Programming the Arduino;
- Learning to Program the Arduino;
- Arduino Programming For Beginners: The Traffic Light Controller;
- Learning the C Language with Arduino;
- Arduino Microcontroller Guide;
Arduino Tools and Libraries
Tools, libraries and software compatible Arduino for an easy way of development and debugging programming lines.
- Writing a Library for Arduino – with strong programming knowledge any user can start programming libraries Arduino compatible;
- Development Tools – comprehensive list with tools and utilities Arduino compatible;
- Arduino Toolkit – import, export, access libraries and programming lines with Arduino Toolkit;
- AVRDUDE – command line software for Arduino boards;
- FRITZING Starter Kit – kit Arduino compatible to start develop applications;
- Arduino Debug Tool – Debug Over Serial, XBee, Bluetooth, IP/Net – a powerful tool for real-time debugging Arduino project