You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
This library is based on, modified, bug-fixed and improved from [`DataCute`](https://github.com/datacute/DoubleResetDetector) to add support for ESP32.
6
12
7
13
Using this library to detect a double reset, using
8
14
9
15
1. RTC Memory, EEPROM or SPIFFS for ESP8266
10
16
2. EEPROM and SPIFFS for ESP32.
11
17
12
-
It is tested and working with
13
-
1.[`ESP8266 Core 2.6.2 or newer`](https://github.com/esp8266/Arduino)
14
-
2.[`ESP32 Core 1.0.4 or newer`](https://github.com/espressif/arduino-esp32)
18
+
## Prerequisite
19
+
1.[`Arduino IDE 1.8.12 or later` for Arduino](https://www.arduino.cc/en/Main/Software)
20
+
2.[`ESP32 core 1.0.4 or later`](https://github.com/espressif/arduino-esp32/releases) for ESP32 (Use Arduino Board Manager)
21
+
3.[`ESP8266 core 2.6.3 or later`](https://github.com/esp8266/Arduino/releases) for ES82662 (Use Arduino Board Manager)
15
22
16
23
### Quick Start
17
24
18
-
#### Use Arduino Library Manager
25
+
#### Installing use Arduino Library Manager
19
26
20
-
The easiest way is to use `Arduino Library Manager`. Search for `ESP_DoubleResetDetector`, then select / install the latest version.
27
+
1. The easiest way is to use `Arduino Library Manager`. Search for `ESP_DoubleResetDetector`, then select / install the latest version.
28
+
2. More detailed instructions at [](https://www.ardu-badge.com/ESP_DoubleResetDetector)
21
29
22
30
#### Manual Install
23
31
24
-
The suggested way to install manually is to:
25
-
26
32
1. Navigate to [ESP_DoubleResetDetector](https://github.com/khoih-prog/ESP_DoubleResetDetector) page.
27
33
2. Download the latest release `ESP_DoubleResetDetector-master.zip`.
28
34
3. Extract the zip file to `ESP_DoubleResetDetector-master` directory
29
-
4. Copy whole `ESP_DoubleResetDetector-master` folder to Arduino libraries' directory such as `~/Arduino/libraries`.
35
+
4. Copy whole
36
+
-`ESP_DoubleResetDetector-master` folder to Arduino libraries directory such as `~/Arduino/libraries`.
30
37
31
38
### Releases
32
-
#### New in v1.0.1
39
+
40
+
#### Releases v1.0.2
41
+
42
+
1. Fix bug by left-over cpp file.
43
+
2. Fix bug in example.
44
+
3. Enhance README.md
45
+
46
+
#### Releases v1.0.1
33
47
34
48
1. Add EEPROM and SPIFFS support, besides RTC memory, for ESP8266
* This example will open a configuration portal when the reset button is pressed twice.
25
-
* This method works well on Wemos boards which have a single reset button on board. It avoids using a pin for launching the configuration portal.
26
-
*
27
-
* How It Works
28
-
* 1) ESP8266
29
-
* Save data in RTC memory, EPPROM or SPIFFS
30
-
* 2) ESP32
31
-
* Save data in
32
-
* a) EEPROM from address 256, size 512 bytes (both configurable)
33
-
* b) SPIFFS, file name "/drd.dat"
34
-
*
35
-
* So when the device starts up it checks this region of ram for a flag to see if it has been recently reset.
36
-
* If so it launches a configuration portal, if not it sets the reset flag. After running for a while this flag is cleared so that
37
-
* it will only launch the configuration portal in response to closely spaced resets.
38
-
*
39
-
* Settings
40
-
* There are two values to be set in the sketch.
41
-
*
42
-
* DRD_TIMEOUT - Number of seconds to wait for the second reset. Set to 10 in the example.
43
-
* DRD_ADDRESS - The address in ESP8266 RTC RAM to store the flag. This memory must not be used for other purposes in the same sketch. Set to 0 in the example.
44
-
*
45
-
* This example, originally relied on the Double Reset Detector library from https://github.com/datacute/DoubleResetDetector
46
-
* To support ESP32, use ESP_DoubleResetDetector library from //https://github.com/khoih-prog/ESP_DoubleResetDetector
21
+
This example will open a configuration portal when the reset button is pressed twice.
22
+
This method works well on Wemos boards which have a single reset button on board. It avoids using a pin for launching the configuration portal.
23
+
24
+
How It Works
25
+
1) ESP8266
26
+
Save data in RTC memory, EPPROM or SPIFFS
27
+
2) ESP32
28
+
Save data in
29
+
a) EEPROM from address 256, size 512 bytes (both configurable)
30
+
b) SPIFFS, file name "/drd.dat"
31
+
32
+
So when the device starts up it checks this region of ram for a flag to see if it has been recently reset.
33
+
If so it launches a configuration portal, if not it sets the reset flag. After running for a while this flag is cleared so that
34
+
it will only launch the configuration portal in response to closely spaced resets.
35
+
36
+
Settings
37
+
There are two values to be set in the sketch.
38
+
39
+
DRD_TIMEOUT - Number of seconds to wait for the second reset. Set to 10 in the example.
40
+
DRD_ADDRESS - The address in ESP8266 RTC RAM to store the flag. This memory must not be used for other purposes in the same sketch. Set to 0 in the example.
41
+
42
+
This example, originally relied on the Double Reset Detector library from https://github.com/datacute/DoubleResetDetector
43
+
To support ESP32, use ESP_DoubleResetDetector library from //https://github.com/khoih-prog/ESP_DoubleResetDetector
0 commit comments