This is caused by a connection error between your computer and the Arduino, and can result from many different specific problems. Here are some things that can fix this error:
- Disconnect and reconnect the USB cable.
- Use a different USB cable.
- Press the reset button on the board.
- Restart the Arduino IDE.
- Make sure you select the right board in
Tools ► Board ►, e.g. If you are using the Duemilanove 328, select that instead of Duemilanove 128. The board should say what version it is on the microchip. - Make sure you selected the right port in
Tools ► Serial Port ►. One way to figure out which port it is on is by following these steps:
- Disconnect the USB cable.
- Go to
Tools ► Serial Port ►and see which ports are listed (e.g. COM4 COM5 COM14). - Reconnect the USB cable.
- Go back to
Tools ► Serial Port ►, and see which port appeared that wasn't there before.
- In extreme cases, you may need to burn the bootloader.