I got a unknown error

Arduino: 1.8.19 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 10752 bytes (4%) of program storage space. Maximum is 253952 bytes.

Global variables use 377 bytes (4%) of dynamic memory, leaving 7815 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

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_getsync(): timeout communicating with programmer

An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.<

When I tried to upload the code to Arduino Mega , I got this error. I don't know how to fix this. Can someone help me?

It means the Arduino is not responding to your computer.
Have you selected the correct Arduino type in the tools menu?
Have you tried using another USB cable?

Those are the two most common mistakes.

Can you load the blink sketch?

Let me try using other USB cable

I actually find out that previous cable that I used is broken
. Thanks a lot!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.