1128Views8Replies

Author Options:

Remove a sketch from ATmega328 Answered

Is It possible to remove a sketch from an Arduino with a 328 using the Arduino IDE?
I have deleted the sketch from my PC.
The program is running now but no more sketch in the Arduino files.
Or is rewriting it the only way?   

Discussions

0
None
allan.hogue.3

4 years ago

No controller should ever get hooked to Input and Output devices unless it is cleared of logic or has a known program that matches the hardware. Arduino is pretty much a toy but get good safety habits now. Full size robots or control systems can be dangerous.

0
None
bwrussell

6 years ago

Just rewrite with a blank sketch. Is there a reason you need to do this?

I believe a blank sketch would be:
void setup()
{}
void loop()
{}

0
None
WWCbwrussell

Answer 6 years ago

Maybe i wrote the question not as clear as i could.
I have a LM35 thermometer sketch with LCD readout running now on my Arduino, but i deleted the program from my computer.
I was asking if it is possible to read the program on the chip and put it back into the Arduino IDE.

Kind of a reverse programming or if the only way is to re write the sketch again.

0
None
maewertWWC

Answer 6 years ago

No way to get back the original sketch. The Arduino contains the compiled image only so you could at most get back Atmega assembly language.

Sorry.

0
None
WWCmaewert

Answer 6 years ago

So my lesson here is be more careful when saving sketches.

Thanks

0
None
bwrussellWWC

Answer 6 years ago

Yep, learn from your mistakes and keep a backup in the future.

0
None
astroboy907bwrussell

Answer 6 years ago

I believe you can acutally save the .hex file to your computer, using a programmer (e.g using an AVRISP MKII and Avr Studio)

However the resulting file will not be editable, at least not through the arduino software/language itself

0
None
WWCastroboy907

Answer 6 years ago

Ah
That is getting beyond my skills at this time.
I have already re written it again.
Good for me anyway i need the practice.

Thanks