Cant upload sketch to Arduino Mega

Hi all

So, I was experimenting with Serial communication between two arduino's, and being in the test-phase, i uploaded some code to my Mega, and now its stuck :stuck_out_tongue:

So basically, i said:

if(Serial)
send(char)

and now, everytime i plug in my Mega, it just begins sending these chars. Problem is, i cant upload any code now, because the serial port is busy...

Any ideas?

thanks!

Ok, so since posting this, i have been able to upload a sketch that would just blink some leds, and it did just that,
so i thought this problem was fixed. But now, i have the same problem.
I still cant upload any sketch and while trying, the blinking of the leds stops for a few seconds. Then i get the error message (avrdude: stk500v2_ReceiveMessage(): timeout) and it starts blinking again....

If you have one working board you could use that to re-upload a bootloader to the other JIC it got corrupted somehow.

Look up ISCP Arduino for how to do that as there are plenty of working examples.