Code not downloading in Arduino

Hi,

I am trying to download the 'Blink' sample code in the Arduino Mega 2560, but it is giving me the following error:

Arduino: 1.8.9 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"


avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\S\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"

         Using Port                    : COM8
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
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
avrdude done.  Thank you.

When I changed my computer, the code downloaded without any errors.

It worked fine last week on my computer, but since yesterday, it's giving the above errors on my PC. At this moment, when I connect the Mega 2560 to the PC, the Green LED for ON and Orange LED are glowing. When I press the reset button, the Orange LED blinks once. Please guide me.

Thanks.

Solved!!

It was a problem with the drivers in my Computer. I uninstalled Arduino from the Add or Remove programs section.
I then deleted all the Arduino15 folders from the C:drive → Users → [User Account Name] → AppDate(hidden folder) → Local (Also check ‘Roaming’) → Arduino15.

After I deleted all Arduino15 folders, I re-installed Arduino. Now it successfully downloads the sample codes in the Arduino boards.

I wasted 2 days on this. Hope it helps save everyone else’s time.

Thanks for taking the time to share your solution Jeetdesai! I'm glad to hear you are now able to upload to your Arduino. Enjoy! Per

Jeetdesai: Solved!!

It was a problem with the drivers in my Computer. I uninstalled Arduino from the Add or Remove programs section. I then deleted all the Arduino15 folders from the C:drive -> Users -> [User Account Name] -> AppDate(hidden folder) -> Local (Also check 'Roaming') -> Arduino15.

After I deleted all Arduino15 folders, I re-installed Arduino. Now it successfully downloads the sample codes in the Arduino boards.

I wasted 2 days on this. Hope it helps save everyone else's time.

you re-installed Arduino. From where you download the Arduino IDE

BrainScoop: From where you download the Arduino IDE

Here: http://www.arduino.cc/en/Main/Software