Arduino 1.8.4 avrdude: stk500v2 SOLVED!

Good day! So I was just trying out my code and then suddenly my Arduino ATMEGA 2560 was stuck at uploading and gave an error message

Sketch uses 3784 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 270 bytes (3%) of dynamic memory, leaving 7922 bytes for local variable. 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

I tried to upload my code several times but it sends me this same error. I checked my Board, Processor and Port and everthing was correct. I tried searching for solutions online and tried everything but didn't work. Hoping someone is able to solve my problem here. Thank you very much.

Hi,

it means you should changes that proccessor, i have same problem like this.
The precessor from ATMEGA 2650 chip wasnt recieve data anymore.

Really? The processor should be replaced? Thanks for the suggestion but I also tried the "Blink" example from Arduino with no wires connected to its I/O pins and it works fine. But when I suddenly inserted wires to the I/O pin it shows that error message above again. Is there any way to solve this problem except buying its processor? Thanks.

The problem is solved! It wasn't actually the processor's fault but the breadboard circuit I connected to the Arduino ATMEGA 2560.

My LEDs were not connected to a resistor after the wire connecting to a pin (I'm such an idiot: I connected the resistor after the LED and to the ground since I saw a similar circuit to the one I initially used) which I think makes the Arduino draw more current from my laptop than it actually requires. That's what I think.

By the way, thanks for the suggestions! Thank you very much

My LEDs were not connected to a resistor after the wire connecting to a pin (I'm such an idiot

Its okay, thats how we use the arduino :), better try than not.

,..niel