How would you store an unsigned int, and write the value more than flash memory can handle?
I'm looking basically have a pulse counter that retains it's value. I would like to "store" it every pulse but from what I read about flash memory it can only handle roughly 100k write cycles. This would only last about 2 years in this case. I could potentially write every 10 pulses but would prefer to write every pulse.
Hardware would be an esp32.
Thanks
Did you mean EEPROM?
Edit: Sorry, missed the esp32 reference
The ESP has 16k battery backed up SRAM. Not sure what it takes to use that with the Arduino core.
Would prefer not to have a battery backup on this rig, it will be fairly remote and not easy to access. If the power is cut the device this is reading will also be cut so it's not a big deal. I am trying to access the data remotely via a webserver for remote reading but don't want to be replacing the nodemcu every year or two.
I suppose I could do a write every 10 pulses and that would push it out hopefully a lot longer.
Why not add an I2C FRAM ?
TheMemberFormerlyKnownAsAWOL:
Why not add an I2C FRAM ?
Thank you for the suggestion, looking into this now.