How to erase program?

Hello,

I'm new to Arduino, and I've successfully loaded the 'Blink' application. However, I'd like to erase the program memory and leave it blank.

I've tried in two ways:

  • By loading "eeprom_clear" code
  • By loading a new "dummy" code, as follows:
void setup()   
{               
}
void loop()                     
{
}

No matter how, the led stills blinks.

¿Am I missing something?

Thanks!

Loading that dummy program should have stopped the blinking. Did it upload without errors?

Hello,

no it always displays the following:

avrdude: stk500_getsync(): not in sync: resp=0x30

But it said the same the first time I loaded the blink code, and yet it worked then.

¿does that error mean anything to you?

Thanks for your reply!

banderas20:
But it said the same the first time I loaded the blink code, and yet it worked then.

No it didn't.

banderas20:
¿does that error mean anything to you?

Yes it means the IDE was unable to program the chip.

I've solved it. Somehow, the old COM port had misconfigured. I have reinstalled the drivers, and it works with a new COM.

Thanks!

Normally there is no need to clear the Arduino (it costs extra time and reduces the # writes with a factor 2).

Furthermore overwriting it with a small program would probably leave parts from a bigger program in memory.
(it would be nice to try that!)

Agreed. Don't bother clearing the memory. The number of time that you can write to flash is large but finite.

Just overwrite it with your new programme.

Good advice. Thanks!