arduinoarduino-ide

Arduino: Upload Timeout error


I'm new to the Arduino programming. I'm using an Arduino Mega 2560 R3 and use Arduino IDE 1.5.5-r2. I have a very simple program and when I try to upload, it locks near the end. Some time appears to me the following error:

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

I am using the correct COM port and I have the right board selected

When I try to connect the Rx pin with the pin Tx, writing in the console I get the data correctly in the monitor.

Any ideias?

Thanks.


Solution

  • Seems like auto-reset is not working. keep pressed reset and then click upload on the IDE, when the IDE say sketch size... release reset button. Many tries are needed to get the right timing. This happen because you are flooding the serial, try putting a delay right after setup()