- Notifications
You must be signed in to change notification settings - Fork4
Library to detect a multi reset within a predetermined time, using RTC Memory, EEPROM, LittleFS or SPIFFS for ESP8266 and ESP32, ESP32_C3, ESP32_S2, ESP32_S3. An alternative start-up mode can be used. One example use is to allow re-configuration of device WiFi credentials
License
khoih-prog/ESP_MultiResetDetector
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- Why do we need this ESP_MultiResetDetector library
- Changelog
- Prerequisites
- Installation
- HOWTO Usage
- Examples
- Examples from other libraries
- 1. ESP_WiFiManager Library
- 2. ESPAsync_WiFiManager Library
- Many other libraries are depending on this library's DRD and MRD feature
- Example checkWaitingMRD
- Debug Terminal Output Samples
- Libraries using ESP_MultiResetDetector, ESP_DoubleResetDetector or DoubleResetDetector_Generic library
- Debug
- Troubleshooting
- Issues
- TO DO
- DONE
- Contributions and Thanks
- Contributing
- License
- Copyright
Why do we need thisESP_MultiResetDetector library
ESP_MultiResetDetector is a library for theESP8266 and ESP32 boards to detects aconfigurable multi reset, within configurable timeout (default 10s) seconds, so that an alternative start-up mode can be used. Example use cases are to allow re-configuration of a device's WiFi / MQTT / Blynk credentials or to count the number of resets within a pre-determined timed.
This library is based on, modified, bug-fixed and improved fromStephen Denne's DoubleResetDetector to add support to ESP8266 and ESP32 using EEPROM, SPIFFS and LittleFS besides original RTC.
Currently,DoubleResetDetector only supports ESP8266 using RTC memory.
This library can be used to detect amulti reset within a predetermined time to force the program to enter a special operation such as Config Portal, Clear Default Data, etc., using :
- EEPROM, SPIFFS or LittleFS for ESP8266 and ESP32 boards.
- RTC memory for ESP8266 boards (unadvised).
ThisESP_MultiResetDetector library currently supports these following boards:
- ESP32, ESP32_C3, ESP32_S2 and ESP32_S3 boards, using EEPROM, SPIFFS or LittleFS.
- ESP8266 boards RTC memory, EEPROM, SPIFFS or LittleFS
Arduino IDE 1.8.19+for Arduino.ESP32 Core 2.0.5+for ESP32-based boards.ESP8266 Core 3.0.2+for ESP8266-based boards.. SPIFFS is deprecated from ESP8266 core 2.7.1+, to use LittleFS.
LittleFS_esp32 v1.0.6+for ESP32-based boards using LittleFS with ESP32 corev1.0.5-. To install, check.Notice: This
LittleFS_esp32 libraryhas been integrated to ArduinoESP32 core v1.0.6+ andyou don't need to install it if using ESP32 core v1.0.6+
The best and easiest way is to useArduino Library Manager. Search forESP_MultiResetDetector, then select / install the latest version. You can also use this link for more detailed instructions.
- Navigate toESP_MultiResetDetector page.
- Download the latest release
ESP_MultiResetDetector-main.zip. - Extract the zip file to
ESP_MultiResetDetector-maindirectory - Copy the whole
ESP_MultiResetDetector-mainfolder to Arduino libraries' directory such as~/Arduino/libraries/.
- InstallVS Code
- InstallPlatformIO
- InstallESP_MultiResetDetector library by usingLibrary Manager. Search forESP_MultiResetDetector inPlatform.io Author's Libraries
- Use includedplatformio.ini file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples atProject Configuration File
How to use
// These defines must be put before #include <ESP_MultiResetDetector.h>// to select where to store MultiResetDetector's variable.// For ESP32, You must select one to be true (EEPROM or SPIFFS)// For ESP8266, You must select one to be true (RTC, EEPROM, LITTLEFS or SPIFFS)// Otherwise, library will use default EEPROM storage#ifdef ESP8266 #defineESP8266_MRD_USE_RTCfalse//true#endif#defineESP_MRD_USE_LITTLEFStrue#defineESP_MRD_USE_SPIFFSfalse#defineESP_MRD_USE_EEPROMfalse#defineMULTIRESETDETECTOR_DEBUGtrue//false// These definitions must be placed before #include <ESP_MultiResetDetector.h> to be used// Otherwise, default values (MRD_TIMES = 3, MRD_TIMEOUT = 10 seconds and MRD_ADDRESS = 0) will be used// Number of subsequent resets during MRD_TIMEOUT to activate#defineMRD_TIMES5// Number of seconds after reset during which a// subsequent reset will be considered a multi reset.#defineMRD_TIMEOUT10// RTC/EEPROM Memory Address for the MultiResetDetector to use#defineMRD_ADDRESS0#include<ESP_MultiResetDetector.h>//https://github.com/khoih-prog/ESP_MultiResetDetectorMultiResetDetector* mrd;#ifdef ESP32// For ESP32 #ifndef LED_BUILTIN #defineLED_BUILTIN2// Pin D2 mapped to pin GPIO2/ADC12 of ESP32, control on-board LED #endif #defineLED_OFF LOW #defineLED_ON HIGH#else// For ESP8266 #defineLED_ON LOW #defineLED_OFF HIGH#endifvoidsetup(){pinMode(LED_BUILTIN, OUTPUT); Serial.begin(115200);while (!Serial);delay(200); Serial.print(F("\nStarting ESP_MultiResetDetector minimal on")); Serial.print(ARDUINO_BOARD);#if ESP_MRD_USE_LITTLEFS Serial.println(F(" using LittleFS"));#elif ESP_MRD_USE_SPIFFS Serial.println(F(" using SPIFFS"));#else Serial.println(F(" using EEPROM"));#endif Serial.println(ESP_MULTI_RESET_DETECTOR_VERSION); mrd =newMultiResetDetector(MRD_TIMEOUT, MRD_ADDRESS);if (mrd->detectMultiReset()) { Serial.println("Multi Reset Detected");digitalWrite(LED_BUILTIN, LED_ON); }else { Serial.println("No Multi Reset Detected");digitalWrite(LED_BUILTIN, LED_OFF); }}voidloop(){// Call the multi reset detector loop method every so often,// so that it can recognise when the timeout expires.// You can also call mrd.stop() when you wish to no longer// consider the next reset as a multi reset. mrd->loop();}
- 1. ConfigOnDoubleReset
- 2. ConfigOnDRD_FS_MQTT_Ptr
- 3. ESP32_FSWebServer_DRD
- 4. ESP_FSWebServer_DRD
- 5. ConfigOnDRD_ESP32_minimal
- 6. ConfigOnDRD_ESP8266_minimal
- 7. ConfigOnDRD_FS_MQTT_Ptr_Complex
- 8. ConfigOnDRD_FS_MQTT_Ptr_Medium
- 1. Async_ConfigOnDoubleReset
- 2. Async_ConfigOnDRD_FS_MQTT_Ptr
- 3. Async_ESP32_FSWebServer_DRD
- 4. Async_ESP_FSWebServer_DRD
- 5. Async_ConfigOnDRD_ESP32_minimal
- 6. Async_ConfigOnDRD_ESP8266_minimal
- 7. Async_ConfigOnDRD_FS_MQTT_Ptr_Complex
- 8. Async_ConfigOnDRD_FS_MQTT_Ptr_Medium
and there are many more.
All examples of these following libraries are using DRD/MRD feature of thisESP_DoubleResetDetector Library orESP_MultiResetDetector Library
- 1. Blynk_WM
- 2. Blynk_Async_WM
- 3. BlynkEthernet_WM
- 4. BlynkESP32_BT_WF
- 5. BlynkGSM_Manager
- 6. Blynk_Async_ESP32_BT_WF
- 7. Blynk_Async_GSM_Manager
- 8. Ethernet_Manager
ExamplecheckWaitingMRD
ESP_MultiResetDetector/examples/checkWaitingMRD/checkWaitingMRD.ino
Lines 16 to 150 inc878d5e
| // These defines must be put before #include <ESP_MultiResetDetector.h> | |
| // to select where to store MultiResetDetector's variable. | |
| // For ESP32, You must select one to be true (EEPROM or SPIFFS) | |
| // For ESP8266, You must select one to be true (RTC, EEPROM, LITTLEFS or SPIFFS) | |
| // Otherwise, library will use default EEPROM storage | |
| // This example demonstrates how to use new function waitingForMRD() to signal the stage of MRD | |
| // waitingForMRD() returns true if in MRD_TIMEOUT, false when out of MRD_TIMEOUT | |
| // In this example, LED_BUILTIN will blink in MRD_TIMEOUT period, ON when DR has been detected, OFF otherwise | |
| #ifdef ESP8266 | |
| #defineESP8266_MRD_USE_RTCfalse//true | |
| #endif | |
| #defineESP_MRD_USE_LITTLEFStrue | |
| #defineESP_MRD_USE_SPIFFSfalse | |
| #defineESP_MRD_USE_EEPROMfalse | |
| // Uncomment to have debug | |
| //#define MULTIRESETDETECTOR_DEBUG true | |
| // These definitions must be placed before #include <ESP_MultiResetDetector.h> to be used | |
| // Otherwise, default values (MRD_TIMES = 3, MRD_TIMEOUT = 10 seconds and MRD_ADDRESS = 0) will be used | |
| // Number of subsequent resets during MRD_TIMEOUT to activate | |
| #defineMRD_TIMES3 | |
| // Number of seconds after reset during which a | |
| // subsequent reset will be considered a multi reset. | |
| #defineMRD_TIMEOUT10 | |
| // RTC/EEPROM Memory Address for the MultiResetDetector to use | |
| #defineMRD_ADDRESS0 | |
| #include<ESP_MultiResetDetector.h>//https://github.com/khoih-prog/ESP_MultiResetDetector | |
| MultiResetDetector* mrd; | |
| #ifdef ESP32 | |
| // For ESP32 | |
| #ifndef LED_BUILTIN | |
| #defineLED_BUILTIN2// Pin D2 mapped to pin GPIO2/ADC12 of ESP32, control on-board LED | |
| #endif | |
| #defineLED_OFF LOW | |
| #defineLED_ON HIGH | |
| #else | |
| // For ESP8266 | |
| #defineLED_ON LOW | |
| #defineLED_OFF HIGH | |
| #endif | |
| bool MRD_Detected =false; | |
| voidcheck_status() | |
| { | |
| static ulong checkstatus_timeout =0; | |
| staticbool LEDState = LED_OFF; | |
| static ulong current_millis; | |
| #defineMRD_CHECK_INTERVAL500L | |
| current_millis =millis(); | |
| // If MRD_Detected, don't need to blink, just keep LED_BUILTIN ON | |
| if ( !MRD_Detected && ((current_millis > checkstatus_timeout) || (checkstatus_timeout ==0)) ) | |
| { | |
| // If in MRD checking loop, blinking the LED_BUILTIN | |
| if ( mrd->waitingForMRD() ) | |
| { | |
| digitalWrite(LED_BUILTIN, LEDState); | |
| LEDState = !LEDState; | |
| } | |
| else | |
| { | |
| digitalWrite(LED_BUILTIN, LED_OFF); | |
| } | |
| checkstatus_timeout = current_millis + MRD_CHECK_INTERVAL; | |
| } | |
| } | |
| voidsetup() | |
| { | |
| pinMode(LED_BUILTIN, OUTPUT); | |
| Serial.begin(115200); | |
| while (!Serial); | |
| delay(200); | |
| Serial.print("\nStarting checkWaitingMRD on"); | |
| Serial.println(ARDUINO_BOARD); | |
| #if ESP_MRD_USE_LITTLEFS | |
| Serial.println(F(" using LittleFS")); | |
| #elif ESP_MRD_USE_SPIFFS | |
| Serial.println(F(" using SPIFFS")); | |
| #else | |
| Serial.println(F(" using EEPROM")); | |
| #endif | |
| Serial.println(ESP_MULTI_RESET_DETECTOR_VERSION); | |
| mrd =newMultiResetDetector(MRD_TIMEOUT, MRD_ADDRESS); | |
| if (mrd->detectMultiReset()) | |
| { | |
| Serial.println("Multi Reset Detected"); | |
| digitalWrite(LED_BUILTIN, LED_ON); | |
| MRD_Detected =true; | |
| } | |
| else | |
| { | |
| Serial.println("No Multi Reset Detected"); | |
| digitalWrite(LED_BUILTIN, LED_OFF); | |
| } | |
| } | |
| voidloop() | |
| { | |
| // Call the double reset detector loop method every so often, | |
| // so that it can recognise when the timeout expires. | |
| // You can also call mrd.stop() when you wish to no longer | |
| // consider the next reset as a double reset. | |
| mrd->loop(); | |
| check_status(); | |
| } |
This is terminal debug output when runningESP32_FSWebServer_DRD onESP32 ESP32_DEV.. Config Portal was requested by DRD to input and save Credentials. The boards then connected to WiFi APHueNet1 using new Static IP successfully. WiFi APHueNet1 is then lost, and boardautoreconnects itself to backup WiFi APHueNet2.
Starting ESP32_FSWebServer_DRD with DoubleResetDetectusing SPIFFS on ESP32_DEVESP_WiFiManager v1.12.1ESP_MultiResetDetector v1.3.2FS File: /ConfigSW.json, size: 150BFS File: /CanadaFlag_1.png, size:40.25KBFS File: /CanadaFlag_2.png, size:8.12KBFS File: /CanadaFlag_3.jpg, size:10.89KBFS File: /edit.htm.gz, size:4.02KBFS File: /favicon.ico, size:1.12KBFS File: /graphs.js.gz, size:1.92KBFS File: /index.htm, size:3.63KBFS File: /drd.dat, size: 4BFS File: /wifi_cred.dat, size: 192B[WM] RFC925 Hostname = ESP32-FSWebServerDRD[WM] setAPStaticIPConfig[WM] setSTAStaticIPConfigfor USE_CONFIGURABLE_DNS[WM] Set CORS Header to : Your Access-Control-Allow-OriginStored: SSID = HueNet2, Pass =12345678[WM] * Add SSID = HueNet2 , PW =12345678Got stored Credentials. Timeout 120sfor Config PortalSPIFFS Flag read =0xd0d04321No multiResetDetectedSaving config file...Saving config file OK[WM] LoadWiFiCfgFile [WM] OK[WM] * Add SSID = HueNet1 , PW =12345678[WM] * Add SSID = HueNet2 , PW =12345678ConnectMultiWiFi in setup[WM] ConnectMultiWiFi with :[WM] * Flash-stored Router_SSID = HueNet2 , Router_Pass =12345678[WM] * Additional SSID = HueNet1 , PW =12345678[WM] * Additional SSID = HueNet2 , PW =12345678[WM] Connecting MultiWifi...[WM] WiFi connected after time:1[WM] SSID: HueNet1 ,RSSI= -27[WM] Channel:2 ,IP address:192.168.2.232After waiting3.16 secs more insetup(), connection result is connected. Local IP: 192.168.2.232HTTP server started @ 192.168.2.232Open http://esp32-fs-browser.local/edit to see the file browser[WM] freeing allocated params!Stop multiResetDetectingSaving config file...Saving config file OKWiFi lost. Call connectMultiWiFi in loop[WM] ConnectMultiWiFi with :[WM] * Flash-stored Router_SSID = HueNet2 , Router_Pass = 12345678[WM] * Additional SSID = HueNet1 , PW = 12345678[WM] * Additional SSID = HueNet2 , PW = 12345678[WM] Connecting MultiWifi...[WM] WiFi connected after time: 3[WM] SSID: HueNet2 ,RSSI= -59[WM] Channel: 4 ,IP address: 192.168.2.232HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH HHHHHHHHHH
This is terminal debug output when runningminimal onESP32 ESP32_DEV using LittleFS.. Config Portal was requested by MRD to input and save Credentials.
Starting ESP_MultiResetDetector minimal on ESP32_DEVusing LittleFSESP_MultiResetDetector v1.3.2/home/kh/Arduino/libraries/LITTLEFS-master/src/lfs.c:1003:error: Corrupted dir pair at {0x0,0x1}E (241) esp_littlefs: mount failed, (-84)E (245) esp_littlefs: Failed to initialize LittleFSmultiResetDetectorFlag = 0xFEFEFEFElowerBytes = 0xFEFE, upperBytes = 0x0101lowerBytes = 0xFEFE, upperBytes = 0x0101detectRecentlyResetFlag: Data corrupted. Reset to 0No multiResetDetected, number of times = 0Saving config file...Saving config file OKNo Multi Reset DetectedStop multiResetDetectingSaving config file...Saving config file OK
Starting ESP_MultiResetDetector minimal on ESP32_DEVusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFE0001multiResetDetectorFlag =0xFFFE0001lowerBytes =0x0001, upperBytes =0x0001No multiResetDetected, number of times =1LittleFS Flag read =0xFFFE0001Saving config file...Saving config file OKNo Multi Reset Detected
Starting ESP_MultiResetDetector minimal on ESP32_DEVusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFD0002multiResetDetectorFlag =0xFFFD0002lowerBytes =0x0002, upperBytes =0x0002No multiResetDetected, number of times =2LittleFS Flag read =0xFFFD0002Saving config file...Saving config file OKNo Multi Reset Detected
Starting ESP_MultiResetDetector minimal on ESP32_DEVusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFC0003multiResetDetectorFlag =0xFFFC0003lowerBytes =0x0003, upperBytes =0x0003No multiResetDetected, number of times =3LittleFS Flag read =0xFFFC0003Saving config file...Saving config file OKNo Multi Reset Detected
Starting ESP_MultiResetDetector minimal on ESP32_DEVusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFB0004multiResetDetectorFlag =0xFFFB0004lowerBytes =0x0004, upperBytes =0x0004No multiResetDetected, number of times =4LittleFS Flag read =0xFFFB0004Saving config file...Saving config file OKNo Multi Reset Detected
Starting ESP_MultiResetDetector minimal on ESP32_DEVusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFA0005multiResetDetectorFlag =0xFFFA0005lowerBytes =0x0005, upperBytes =0x0005multiResetDetected, number of times =5Saving config file...Saving config file OKMulti Reset Detected
Starting ESP_MultiResetDetector minimal on ESP32_DEVusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFB0004multiResetDetectorFlag =0xFFFB0004lowerBytes =0x0004, upperBytes =0x0004No multiResetDetected, number of times =4LittleFS Flag read =0xFFFB0004Saving config file...Saving config file OKNo Multi Reset DetectedStop multiResetDetectingSaving config file...Saving config file OK
Starting ESP_MultiResetDetector minimal on ESP32_DEVusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFE0001multiResetDetectorFlag =0xFFFE0001lowerBytes =0x0001, upperBytes =0x0001No multiResetDetected, number of times =1LittleFS Flag read =0xFFFE0001Saving config file...Saving config file OKNo Multi Reset Detected
This is terminal debug output when runningminimal onESP8266_NODEMCU using LittleFS.. Config Portal was requested by MRD to input and save Credentials.
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCUusing LittleFSESP_MultiResetDetector v1.3.2multiResetDetectorFlag =0x00000000lowerBytes =0x0000, upperBytes =0xFFFFlowerBytes =0x0000, upperBytes =0xFFFFdetectRecentlyResetFlag: Data corrupted. Reset to0No multiResetDetected, number of times =0Saving config file...Saving config file OKNo Multi Reset Detected
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCUusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFE0001multiResetDetectorFlag =0xFFFE0001lowerBytes =0x0001, upperBytes =0x0001No multiResetDetected, number of times =1LittleFS Flag read =0xFFFE0001Saving config file...Saving config file OKNo Multi Reset Detected
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCUusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFD0002multiResetDetectorFlag =0xFFFD0002lowerBytes =0x0002, upperBytes =0x0002No multiResetDetected, number of times =2LittleFS Flag read =0xFFFD0002Saving config file...Saving config file OKNo Multi Reset Detected
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCUusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFC0003multiResetDetectorFlag =0xFFFC0003lowerBytes =0x0003, upperBytes =0x0003No multiResetDetected, number of times =3LittleFS Flag read =0xFFFC0003Saving config file...Saving config file OKNo Multi Reset Detected
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCUusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFB0004multiResetDetectorFlag =0xFFFB0004lowerBytes =0x0004, upperBytes =0x0004No multiResetDetected, number of times =4LittleFS Flag read =0xFFFB0004Saving config file...Saving config file OK
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCUusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFA0005multiResetDetectorFlag =0xFFFA0005lowerBytes =0x0005, upperBytes =0x0005multiResetDetected, number of times =5Saving config file...Saving config file OKMulti Reset Detected
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCUusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFB0004multiResetDetectorFlag =0xFFFB0004lowerBytes =0x0004, upperBytes =0x0004No multiResetDetected, number of times =4LittleFS Flag read =0xFFFB0004Saving config file...Saving config file OKNo Multi Reset DetectedStop multiResetDetectingSaving config file...Saving config file OK
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCUusing LittleFSESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFE0001multiResetDetectorFlag =0xFFFE0001lowerBytes =0x0001, upperBytes =0x0001No multiResetDetected, number of times =1LittleFS Flag read =0xFFFE0001Saving config file...Saving config file OKNo Multi Reset Detected
This is terminal debug output when runningESPAsync_WiFi onESP32 ESP32S3_DEV.. Config Portal was requested by MRD to input and save Credentials.
Starting ESPAsync_WiFiusing LittleFS on ESP32S3_DEVESPAsync_WiFiManager_Lite v1.9.0ESP_MultiResetDetector v1.3.2LittleFS Flag read =0xFFFC0003multiResetDetectorFlag =0xFFFC0003lowerBytes =0x0003, upperBytes =0x0003multiResetDetected, number of times =3Saving config file...Saving config file OK[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678[WML] SSID1=HueNet2,PW1=12345678[WML] BName=ESP32_S3[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=12345678[WML] SSID1=HueNet2,PW1=12345678[WML] BName=ESP32_S3[WML] WiFi networks found:[WML]1: HueNetTek, -30dB[WML]2: HueNet, -31dB[WML]3: HueNet1, -36dB[WML]4: HueNet2, -55dB[WML]5: SmartRG-02a2, -75dB[WML]6: AT_301_WLREL6325F_f66d, -75dB[WML]7: Linksys00043, -77dB[WML]8: El khoury, -79dB[WML]9: house, -79dB[WML]10: Waterhome, -87dB[WML]11: Offline5, -89dB[WML]12: Access, -90dB[WML]13: ESP151CD5, -90dB[WML]14: Jessie, -90dB[WML]15: AdeyemiHome, -90dB[WML]16: BELL627, -90dB[WML]17: JJ Realestate Investments, -90dB[WML]18: BELL042, -92dB[WML]19: VIRGIN874, -93dB[WML]20: BELL905, -95dB[WML] stConf:SSID=ESP_E1A1DF7C,PW=MyESP_E1A1DF7C[WML] IP=192.168.4.1,ch=6FYour stored Credentials :Blynk Server1 = account.duckdns.orgToken1 = token1Blynk Server2 = account.ddns.netToken2 = token2Port =8080MQTT Server = mqtt.duckdns.org
Libraries using ESP_MultiResetDetector, ESP_DoubleResetDetector or DoubleResetDetector_Generic library
You can also see howESP_MultiResetDetector andDoubleResetDetector_Generic are applied in many other libraries, such as:
- Blynk_WM
- BlynkEthernet_WM
- WiFiManager_NINA_Lite
- BlynkESP32_BT_WF,
- Blynk_GSM_Manager,
- Blynk_Esp8266AT_WM,
- Blynk_WiFiNINA_WM,
- Blynk_Async_WM,
- Blynk_Async_ESP32_BT_WF,
- Blynk_Async_GSM_Manager,
- ESP_WiFiManager
- ESPAsync_WiFiManager
- WiFiManager_NINA_Lite
- BlynkEthernet_STM32_WM,
- ESP_AT_WM_Lite
- WIOTerminal_WiFiManager
- Ethernet_Manager
- Ethernet_Manager_STM32
and the list is growing fast.
Debug is disabled by default. To enable debug:
// Use this to output debug msgs to Serial#defineMULTIRESETDETECTOR_DEBUGtrue
If you get compilation errors, more often than not, you may need to install a newer version of theESP32 / ESP8266 core for Arduino.
Sometimes, the library will only work if you update theESP32 / ESP8266 core to the latest version because I am using some newly added function.
Submit issues to:ESP_MultiResetDetector issues
- Search for bug and improvement.
- Similar features for Arduino (UNO, Mega, SAM DUE, SAMD21/SAMD51, nRF52, STM32, Teensy, etc.). Look atDoubleResetDetector_Generic
- Multi Reset Detector for ESP32 (EEPROM, SPIFFS and LittleFS) and ESP8266 (RTC, EEPROM, SPIFFS and LittleFS).
- Add support to
ESP32_C3,ESP32_S2 - Add support to
ESP32_S3using ESP32 core v2.0.2+ - Add waitingForMRD() function to signal in MRD waiting period.
- Fix ESP32 chipID for example
ConfigOnMultiReset - Remove dependency on
LittleFS_esp32library to prevent PIO error when using new ESP32 core v1.0.6+ - Add astyle using
allmanstyle. Restyle the library
- Thanks tokbssa for request enhancement inIssue 9: Not an issue, but a question, leading to this newESP_MultiResetDetector Library
- Thanks toTochi Moreno for enhancement request inDRD is waiting for a double reset? #14 leading to v1.3.1 to add
waitingForMRD()function to signal in MRD waiting period
![]() kbssa | ![]() Tochi Moreno |
If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell other people about this library
- The library is licensed underMIT
Copyright (c) 2020- Khoi Hoang
About
Library to detect a multi reset within a predetermined time, using RTC Memory, EEPROM, LittleFS or SPIFFS for ESP8266 and ESP32, ESP32_C3, ESP32_S2, ESP32_S3. An alternative start-up mode can be used. One example use is to allow re-configuration of device WiFi credentials
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.


