Clear Eeprom + upload a sketch = Big No no

Hi to all
i used a code to clear my Eeprom of a Nano


 */

#include <EEPROM.h>

void setup()
{
  // write a 0 to all 512 bytes of the EEPROM
  for (int i = 0; i < 512; i++)
    EEPROM.write(i, 0);
    
  // turn the LED on when we're done
  digitalWrite(13, HIGH);
}

void loop()
{
}

and i i had an other sketch ready to upload to read the eeprom to check if it was all erased

My problem is i press from a mistake to upload the sketch while the previous sketch (clearing eeprom) hadnt finish and so as a result i am stack with an arduino flashing all the time now (led 13) and cant upload anything

is any way to save it? or should i practice with it my skill to basketball + wastebasket

thanks in advance

Erased eeproms are usually erased with all bytes set to x'ff.

You probably can revive it by burning the bootloader using a programmer or a second Arduino programmed as a programmer.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.