I am starting to mess with the EEPROM library to store the state of Firmata. I have run into a question that I can't seem to find the answer to. Basically, I need to find a way to set the initial state of the EEPROM so that I can set the initial state of Firmata. I imagine that by default the EEPROM has gibberish in it, like reading unallocated memory. Ideally, there would be some way to init the EEPROM to 0.This thread
I think if I read the bootloader
correctly the EEPROM is erased when you upload a sketch
. That would work quite nicely if that was true. But it does not seem to be. According to my tests, the EEPROM remains untouched when burning a new firmware.This thread
means that there is code in the bootloader for reseting the EEPROM. Any chance of this getting activated?
Or are there other options for reseting the EEPROM? Maybe this would work best as a menu option in the Arduino IDE.
I am not so usre that erasing EEPROM with each sketch upload would be such a good idea.
(1) the whole write cycle thing, although flash is getting rewritten each time a sketch is loaded I am wondering about the write-cycle life of the EEPROM.
(2) on a more personal basis I want to use EEPROM in a simple program to read to store and EEPROM 1-Wire device IDs, then load a different sketch to make use of the 1-Wire devices.
cheers ... BBR