Arduino: Upload timeout and !!! in a string

If you ever see the following when uploading your sketch to an Arduino board (using the Arduino IDE, PlatformIO or any other):

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
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

Look for !!! (3 exclamation points characters  aka bang) in your code and remove them.

Why ? These 3 exclamation point characters are actually used to tell the Arduino bootloader to switch to 'monitor' mode and when that happens the upload process stops. Simply remove these '!!!' and replace them with something else and your code will compile and upload just fine.

Reference: https://forum.arduino.cc/index.php?topic=83079.120

Comments

Popular posts from this blog

Review of the electronicgeek.ca PRUSA I3 EG-1 3D printer (part 4)

Review of the electronicgeek.ca PRUSA I3 EG-1 3D printer (part 2)

Review of the electronicgeek.ca PRUSA I3 EG-1 3D printer (part 1)