From e543fb1fb5e2d58dd2cee0df5b9b71bc9dbc4cdd Mon Sep 17 00:00:00 2001 From: Felix Rusu Date: Wed, 28 Nov 2018 13:12:01 -0500 Subject: [PATCH] Set EEPROM write limit to 10k --- Examples/SwitchMote/SwitchMote.ino | 1 + Examples/SwitchMote/SwitchMote_withPIR.ino | 1 + 2 files changed, 2 insertions(+) diff --git a/Examples/SwitchMote/SwitchMote.ino b/Examples/SwitchMote/SwitchMote.ino index 17d79fa..eed5a73 100644 --- a/Examples/SwitchMote/SwitchMote.ino +++ b/Examples/SwitchMote/SwitchMote.ino @@ -153,6 +153,7 @@ void setup(void) #ifdef SERIAL_EN Serial.begin(SERIAL_BAUD); #endif + EEPROM.setMaxAllowedWrites(10000); EEPROM.readBlock(0, CONFIG); if (CONFIG.frequency!=RF69_433MHZ && CONFIG.frequency!=RF69_868MHZ && CONFIG.frequency!=RF69_915MHZ) // virgin CONFIG, expected [4,8,9] { diff --git a/Examples/SwitchMote/SwitchMote_withPIR.ino b/Examples/SwitchMote/SwitchMote_withPIR.ino index b9d5506..36f6b2c 100644 --- a/Examples/SwitchMote/SwitchMote_withPIR.ino +++ b/Examples/SwitchMote/SwitchMote_withPIR.ino @@ -170,6 +170,7 @@ void setup(void) #ifdef SERIAL_EN Serial.begin(SERIAL_BAUD); #endif + EEPROM.setMaxAllowedWrites(10000); EEPROM.readBlock(0, CONFIG); if (CONFIG.frequency!=RF69_433MHZ && CONFIG.frequency!=RF69_868MHZ && CONFIG.frequency!=RF69_915MHZ) // virgin CONFIG, expected [4,8,9] {