Where to store critical data in power outage situation on ESP8266 I want to store a counter that is always changing, but I want it to remain and being able to retrieve it on after a power loss.
It's only one long number data, but as it is always changing, I don't know where to store it to not over wear the memory space ?
I'm aware that writting to much on ESP's eeprom or SPIFFS would damage it.I've seen that post, but it doesn't help in my case.
The data to be saved is the volume of water pumped with a water pump during it's entire life.
Of course I could save it only once a while to reduce the number of writting, but I would loose some acccuracy.
If you worry about the maximum number of write cycles, you could write the data to an SD card or some FRAM connected to the ESP8266, or you could send the data to a (web) server (if you have access to one) using WiFi. The server can then store the data.
If you really care about the data, you could do both. Having a backup is the only protection against catastrophic failure.