mtongnz / ESP8266_ArtNetNode_v2

ESP8266 based WiFi ArtNet to DMX, RDM and LED Pixels
GNU General Public License v3.0
611 stars 158 forks source link

Concern about EEPROM burnout #96

Open idtres opened 6 years ago

idtres commented 6 years ago

I am a little bit concern about the fact of writing the eeprom on every power cycle twice, eeprom have short life cycle, but nobody knows the exact count, some say 100.000 others say 10.000, if this second one is the case, and if I use a node every day, its 2 cycles per day, 14 a week, 56 per month, 672 per year, so we should be fine for 14 years?

still I think than we can avoid the writing of the eeprom using this library "reset pin as input", its a clever use of the RTC memory instead of eeprom. If the reset pin was pressed twice in a shot timeframe, it will load the default values. I like this idea to avoid loading default settings by mistake if the node is on a non stable DC power supply. https://github.com/datacute/DoubleResetDetector/

if (drd.detectDoubleReset()) { pinMode(LED_BUILTIN, OUTPUT); Serial.println("Double Reset Detected"); digitalWrite(LED_BUILTIN, LOW); bool resetDefaults = true; eepromSave(); delay(1000); // maybe a restart here }

Barabba11 commented 4 years ago

eprom has sense to be written only when we save datas by web interface..