Go Down

Topic: Sketch on Arduino deleted? (Read 366 times) previous topic - next topic

epelectronics

Hi, I've been programming a sketch and in the middle of testing it, the Arduino froze, deleted the sketch, and loaded the standard Blink sketch. I tried reconnecting it to my computer, but LED 13 was still blinking. It's not a problem, I can just reupload it, but I'd like to know how this happened.

I'm using an Arduino Mega 2560.

pert

By "the Arduino", do you mean the Arduino IDE or the Arduino Mega 2560?

epelectronics

I mean the Arduino Mega 2560

sterretje

The Mega itself can not load any sketch. Is what you observed indeed the blink sketch (1 second on, one second off)? Or can it be the short flashes of the bootloader on the Mega waiting for upload (I assume that that behaviour is te same as on the Uno)?
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Delta_G

Hi, I've been programming a sketch and in the middle of testing it, the Arduino froze, deleted the sketch, and loaded the standard Blink sketch. I tried reconnecting it to my computer, but LED 13 was still blinking. It's not a problem, I can just reupload it, but I'd like to know how this happened.

I'm using an Arduino Mega 2560.
Hang on, so you say you loaded the blink sketch and now you wonder why the blink sketch is running?  It's running blink because you loaded blink.  That replaces whatever you had on there.  It will continue to run blink until you load your code back on it. 
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

meltDown

Hang on, so you say you loaded the blink sketch and now you wonder why the blink sketch is running?
It read to me like the OP thinks the Arduino loaded blink somehow:

Quote
the Arduino .... loaded the standard Blink sketch.

Go Up