The Arduino Platform Arduino is composed of two major parts:
- the Arduino board, which is the piece of hardware you work on when you build your objects;
- the Arduino IDE, the piece of software you run on your computer.
The Arduino Hardware
The Arduino board is a small microcontroller board, which is a small circuit (the board) that contains a whole computer on a small chip (the microcontroller). This computer is at least a thousand times less powerful than the MacBook I’m using to write this, but it’s a lot cheaper and very useful to build interesting devices. Look at the Arduino board: you’ll see a black chip with 28 “legs”—that chip is the ATmega328, the heart of your board.
The Arduino team have placed on this board all the components that are required for this microcontroller to work properly and to communicate with your computer. There are many versions of this board; the one we’ll use throughout this tutorial is the Arduino Uno, which is the simplest one to use and the best one for learning on
Here is an explanation of what every element of the board does:
- 14 Digital IO pins (pins 0–13) These can be inputs or outputs, which is specified by the sketch you create in the IDE.
- 6 Analogue Input pins (pins 0–5) These dedicated analogue input pins take analogue values (i.e., voltage readings from a sensor) and convert them into a number between 0 and 1023.
- 6 Analogue Out pins (pins 3, 5, 6, 9, 10, and 11) These are actually six of the digital pins that can be reprogrammed for analogue output using the sketch you create in the IDE.
Getting Started with Arduino The Software (IDE)
The IDE (Integrated Development Environment) is a special program running on your computer that allows you to write sketches for the Arduino board in a simple language modeled after the Processing language. The magic happens when you press the button that uploads the sketch to the board: the code that you have written is translated into the C language (which is generally quite hard for a beginner to use), and is passed to the avr-gcc compiler, an important piece of open source software that makes the final translation into the language understood by the microcontroller. This last step is quite important, because it’s where Arduino makes your life simple by hiding away as much as possible of the complexities of programming microcontrollers. The programming cycle on Arduino is basically as follows:
» Plug your board into a USB port on your computer.
» Write a sketch that will bring the board to life.
» Upload this sketch to the board through the USB connection and wait a couple of seconds for the board to restart.
» The board executes the sketch that you wrote.
Installing Arduino on Your Computer
To program the Arduino board, you must first download the development environment (the IDE) from here: www.arduino.cc/en/Main/Software. Choose the right version for your operating system. Download the file and double-click on it to open it it; on Windows or Linux, this creates a folder named arduino-[version], such as arduino-1.0. Drag the folder to wherever you want it: your desktop, your Program Files folder (on Windows), etc. On the Mac, double-clicking it will open a disk image with an Arduino application (drag it to your Applications folder). Now whenever you want to run the Arduino IDE, you’ll open up the arduino (Windows and Linux) or Applications folder (Mac), and double-click the Arduino icon. Don’t do this yet, though; there is one more step.
Now you must install the drivers that allow your computer to talk to your board through the USB port. Installing Drivers:
Windows
Plug the Arduino board into the computer; when the Found New Hardware Wizard window comes up, Windows will first try to find the driver on the Windows Update site. Windows XP will ask you whether to check Windows Update; if you don’t want to use Windows Update, select the “No, not at this time” option and click Next. On the next screen, choose “Install from a list or specific location” and click Next. Navigate to and select the Uno’s driver file, named ArduinoUNO.inf, located in the “Drivers” folder of the Arduino Software download (not the “FTDI USB Drivers” sub-directory). Windows will finish up the driver installation from there.
Once the drivers are installed, you can launch the Arduino IDE and start using Arduino.
For more information about Getting Started with the Arduino click here.
NEXT POST:
0 Comments