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 (www.processing.org)
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.
Now you
must install the drivers that allow your computer to talk to your board through
the USB port.
Installing
Drivers: Macintosh
- The Arduino Uno on a Mac uses the drivers provided by the operating system, so the procedure is quite simple. Plug the board into your computer.
- The PWR light on the board should come on and the yellow LED labeled “L” should start blinking.
- You might see a popup window telling you that a new network interface has been detected.
- If that happens, Click “Network Preferences...”, and when it opens, click “Apply”. The Uno will show up as “Not Configured”, but it’s working properly. Quit System Preferences.
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.
- If you have an older board, look for instructions here: www.arduino.cc/en/Guide/Windows.
Port Identification: Macintosh
From the Tools menu in the Arduino IDE, select “Serial Port” and select the port that begins with /dev/cu.usbmodem; this is the name that your computer uses to refer to the Arduino board
Port Identification: Windows
On Windows, the process is a bit more complicated—at least at the beginning. Open the Device Manager by clicking the Start menu, right-clicking on Computer (Vista) or My Computer (XP), and choosing Properties. On Windows XP, click Hardware and choose Device Manager. On Vista, click
Device Manager (it appears in the list of tasks on the left of the window). Look for the Arduino device in the list under “Ports (COM & LPT)”. The Arduino will appear as “Arduino UNO” and will have a name like COM3.
Once you’ve figured out the COM port assignment, you can select that port from the Tools > Serial Port menu in the Arduino IDE. Now the Arduino development environment can talk to the Arduino board and program it.
No comments:
Post a Comment