avrdude: stk500v2_ReceiveMessage(): timeout

Arduino IDE shows an error:

Sketch uses 2378 bytes (0%) of program storage space. Maximum is 253952 bytes. Global variables use 212 bytes (2%) of dynamic memory, leaving 7980 bytes for local variables. Maximum is 8192 bytes. avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout An error occurred while uploading the sketch avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer

How can I solve it?

Answer

This error may occur when you select a wrong board on ARduino IDE. For example, you connect Arduino MEGA to your PC, but board on Arduino IDE is Arduino UNO. Please do the following:

Arduino IDE - How to select Arduino board
Arduino IDE - How to select com port

Buy Arduino

1 × Arduino UNO Buy on Amazon
1 × USB 2.0 cable type A/B Buy on Amazon
1 × Jumper Wires Buy on Amazon
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables.

The Best Arduino Starter Kit

※ OUR MESSAGES