Arduino Frequently Asked Questions

General

How can I get an Arduino board?

See the howto for options, which include buying a board or building your own from the information on the hardware page.

How can I run the Arduino IDE under Linx?

See this forum thread for instructions on getting Arduino to run in Debian. Those of you crazy enough to run Linux on PPC hardware should see this thread. For Gentoo, see these instructions from Jonny Stutters.

Troubleshooting

What if my board doesn't turn on (the green power LED doesn't light up)?

If you're using a USB board, make sure that the jumper (little plastic piece near the USB plug) is on the correct pins. If you're powering the board with an external power supply (plugged into the power plug), the jumper should be on the two pins closest to the power plug. If you're powering the board through the USB, the jumper should be on the two pins closest to the USB plug. This picture shows the arrangment for powering the board from the USB port.

(thanks to mrbbp for report and picture)

The Arduino software won't run on Intel Mac machines.

Arduino 0003 uses a native library for doing serial communication that was only compiled for PPC. You'll need to build your own version of RXTX. See this forum thread for more details.

What do to if I get the following error when launching arduino.exe on Windows? (how to use run.bat)

Arduino has encountered a problem and needs to close.

You'll need to launch Arduino using the run.bat file. To do so, you'll need to change the line that reads:

set JAVA_HOME=""

to:

set JAVA_HOME="java\bin"

Thanks to Tom Igoe for the bug report.

What do I do if I get the following error when launching Arduino?

Uncaught exception in main method: java.lang.UnsatisfiedLinkError: Native Library /Users/anu/Desktop/arduino-0002/librxtxSerial.jnilib already loaded in another classloader

You probably have an old version of the communications library lying around. Search for comm.jar or jcl.jar in /System/Library/Frameworks/JavaVM.framework/ or in directories in your CLASSPATH or PATH environment variables. (reported by Anurag Sehgal)

Why doesn't my board show in the Tools | Serial Port menu ?

If you're using a USB Arduino board, make sure you installed the FTDI drivers (see the Howto for directions). If you're using a USB-to-Serial adapter with a serial board, make sure you installed its drivers.

Make sure that the board is plugged in: the serial port menu refreshes whenever you open the Tools menu, so if you just unplugged the board, it won't be in the menu.

Check that you're not running any programs that scan all serial ports, like PDA sync applications, Bluetooth-USB drivers (e.g. BlueSoleil), virtual daemon tools, etc.

On Windows, the COM port assigned to the board may be too high. From zeveland:

"One little note if you aren't able to export and your USB board is trying to use a high COM port number: try changing the FTDI chip's COM port assignment to a lower one.

"I had a bunch of virtual COM ports set up for Bluetooth so the board was set to use COM17. The IDE wasn't able to find the board so I deleted the other virtual ports in Control Panel (on XP) and moved the FTDI's assignment down to COM2. Make sure to set Arduino to use the new port and good luck."

On the Mac, if you have an old version of the FTDI drivers, you may need to remove them and reinstall the latest version. See this forum thread for directions (thanks to gck).

Why I can't upload my programs to the Arduino board?

There are a few things that could be wrong.

  • First make sure your board is on (the green LED is on) and connected to the computer (if it's not, see "what if my board doesn't turn on" above).

  • Then, check that the proper port is selected in the "Tools | Serial Port" menu (if your port doesn't appear, restart the IDE with the board connected to the computer).

  • Make sure there's a bootloader burned on the Atmega8 on your Arduino board. To check, connect an LED to pin 13 and reset the board. The LED should blink. If it doesn't, see the Bootloader page for instructions on burning a bootloader to the board.

  • Be sure that you are resetting the board a couple of seconds before uploading.

  • Also, on the serial boards, be sure that digital pins 0 and 1 are not connected to anything while uploading (they can connected and used after the code has been uploaded).

  • If you get this error: [VP 1] Device is not responding correctly. try uploading again (i.e. reset the board and press the download button a second time).

  • Then, make sure you have the right speed (baud rate) selected. If you run Arduino-0002 or older: in the "Tools | Serial port speed" menu. It should be 9600 for older boards (those with no version numbers) and 19200 for newer boards (MOST OF -but not all- version 2.0 or greater, and most of the Arduino Extreme, which has two red LEDs marked "RX" and "TX"). If you run Arduino-0003, you will have to change the speed in the preferences file directly. The following picture sequence explains how to find this:

Figure 1: looking for the preferences

In the File-->Preferences submenu you will open a pop-up window that contains the path for the preferences file in your system (note that the path in the picture belongs to the computer where we made the test, it will for sure be different in your machine - the other issue is that on Windows the file may be in a hidden folder).

Figure 2: the path is indicated in the pop-up

Look for the file in your computer and change the serial.download_rate property to match the one in your board. As explained earlier, some older boards still download programs at the speed of 9600.

Figure 3: change the serial.download_rate property

This is the property you will have to tune: 9600 for old boards, 19200 (as shown in the picture) for new boards. Though this is a trick to fix this issue, it is recommended to upgrade the bootloader to version 4, the one that downloads always at 19200. The file to do this is included in the Arduino-0003 distribution.

What if I get this error when uploading code or using the serial monitor (on the Mac)?

Error inside Serial.<init>() 
gnu.io.PortInUseException: Unknown Application 
     at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) 
     at processing.app.Serial.<init>(Serial.java:127) 
     at processing.app.Serial.<init>(Serial.java:72) 

You need to run the macosx_setup.command in the Arduino directory, and then restart your computer.

My code appears to upload correctly, but doesn't run.

Your program is probably too big for the Arduino board. The ATmega8 chip has only 8 Kb of program code, which isn't very much (and 1 Kb is used by the bootloader). If you're using floating point, try to rewrite your code with integer math, which should save you about 2 Kb. Otherwise, see if you can make your program shorter. This is one of the limitations that we have to deal with in order to make the Arduino board as cheap as possible. In new releases of the software, we'll try to make more efficient use of the program space and give an error message if your program is too big.

Why am I getting garbage data from analogRead()?

Try flipping the pin without changing the code (e.g. if you call analogRead(0), use analog input pin 5 instead of 0).

Explanation: On the newer versions of the board, the order of the analog input pins was reversed but version 0002 of the software was not updated along with it. This has been fixed in version 0003.

Why don't I get a PWM (an analog output) when I call analogWrite() on pins other than 9 or 10?

The microcontroller on the Arduino board (the atmega8) only supports PWM/analogWrite() on certain pins. Calling analogWrite() on any other pins will give high (5 volts) for values greater than 128 and low (0 volts) for values less than 128.

How do I burn the bootloader onto my board? Why doesn't burn.bat work on Windows?

See the bootloader page for details on burning the bootloader onto an Arduino board, including corrected scripts for Windows.