I'm working on my first project with an arduino nano
I need to preserve a small amount of data that can be restored after a re boot.
so I'm writing two bytes to the eeprom once every minute, then at boot up, I can read that data back.
I know the eeprom has a write cycle limit of 100,000 cycles, so it won't take long to reach that as I'm doing it now.
First question: As I am only writing 2 bytes, is that only "wearing out" those two bytes of the eeprom or is it "wearing out" the whole lot?
Second question. The main reason I want to save the data once a minute is so that I don't lose the data when it re boots. Now every time you plug in a USB cable, or even just open the serial monitor, it re boots the arduino.
So is there ANY way to create an interrupt of some sort to store my data to eeporm just before it re boots? if so that could do away with my need to store it periodically just in case it's going to be re booted some time soon.