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.
- 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 ►. In extreme cases, you may need to burn the bootloader. There is a good guide on how to do that here: http://arduino.cc/en/Hacking/Bootloader?from=Main.Bootloader. - Restart the Arduino IDE.