Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit da3e185

Browse files
authored
v1.0.3
### Releases v1.0.3 1. Update to use the new LittleFS for ESP8266 core 2.7.1+ 2. Update [minimal example](examples/minimal)
1 parent 6b0364c commit da3e185

File tree

4 files changed

+244
-36
lines changed

4 files changed

+244
-36
lines changed

README.md

Lines changed: 118 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
77
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/ESP_DoubleResetDetector.svg)](http://github.com/khoih-prog/ESP_DoubleResetDetector/issues)
88

9+
---
10+
---
11+
912
### Releases v1.0.3
1013

1114
1. Update to use the new LittleFS for ESP8266 core 2.7.1+
@@ -17,56 +20,55 @@
1720
2. Fix bug in example.
1821
3. Enhance README.md
1922

20-
This library is based on, modified, bug-fixed and improved from [`DataCute`](https://github.com/datacute/DoubleResetDetector) to add support for ESP32.
23+
---
24+
25+
This library is based on, modified, bug-fixed and improved from [`Stephen Denne's DoubleResetDetector`](https://github.com/datacute/DoubleResetDetector) to add support for ESP32 and ESP8266 using EEPROM, LittleFS or SPIFFS besides RTC memory.
2126

22-
Using this library to detect a double reset, using
27+
Using this library to detect a double reset, using:
2328

2429
1. RTC Memory, EEPROM, LittleFS or SPIFFS for ESP8266
2530
2. EEPROM and SPIFFS for ESP32.
2631

32+
---
33+
---
34+
2735
## Prerequisite
28-
1. [`Arduino IDE 1.8.12 or later` for Arduino](https://www.arduino.cc/en/Main/Software)
29-
2. [`ESP32 core 1.0.4 or later`](https://github.com/espressif/arduino-esp32/releases) for ESP32 (Use Arduino Board Manager)
30-
3. [`ESP8266 core 2.7.1 or later`](https://github.com/esp8266/Arduino/releases) for ES82662 (Use Arduino Board Manager) to use LittleFS or SPIFFS. SPIFFS is deprecated from ESP8266 core 2.7.1.
3136

32-
### Quick Start
37+
1. [`Arduino IDE 1.8.12+` for Arduino](https://www.arduino.cc/en/Main/Software)
38+
2. [`ESP32 core 1.0.4+`](https://github.com/espressif/arduino-esp32/releases) for ESP32 (Use Arduino Board Manager)
39+
3. [`ESP8266 core 2.7.3+`](https://github.com/esp8266/Arduino/releases) for ES82662 (Use Arduino Board Manager) to use LittleFS or SPIFFS. SPIFFS is deprecated from ESP8266 core 2.7.1.
40+
41+
---
42+
---
3343

34-
#### Installing use Arduino Library Manager
44+
## Installation
3545

36-
1. The easiest way is to use `Arduino Library Manager`. Search for `ESP_DoubleResetDetector`, then select / install the latest version.
37-
2. More detailed instructions at [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector)
46+
### Use Arduino Library Manager
47+
The best and easiest way is to use `Arduino Library Manager`. Search for `ESP_DoubleResetDetector`, then select / install the latest version.
48+
You can also use this link [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector) for more detailed instructions.
3849

39-
#### Manual Install
50+
### Manual Install
51+
52+
Another way to install is to:
4053

4154
1. Navigate to [ESP_DoubleResetDetector](https://github.com/khoih-prog/ESP_DoubleResetDetector) page.
4255
2. Download the latest release `ESP_DoubleResetDetector-master.zip`.
4356
3. Extract the zip file to `ESP_DoubleResetDetector-master` directory
44-
4. Copy whole
45-
- `ESP_DoubleResetDetector-master` folder to Arduino libraries directory such as `~/Arduino/libraries`.
46-
47-
### Releases
48-
49-
### Releases v1.0.3
50-
51-
1. Update to use the new LittleFS for ESP8266 core 2.7.1+
52-
2. Update [minimal example](examples/minimal)
53-
54-
#### Releases v1.0.2
55-
56-
1. Fix bug by left-over cpp file.
57-
2. Fix bug in example.
58-
3. Enhance README.md
57+
4. Copy whole `ESP_DoubleResetDetector-master` folder to Arduino libraries' directory such as `~/Arduino/libraries/`.
5958

60-
#### Releases v1.0.1
59+
### VS Code & PlatformIO:
60+
1. Install [VS Code](https://code.visualstudio.com/)
61+
2. Install [PlatformIO](https://platformio.org/platformio-ide)
62+
3. Install **ESP_DoubleResetDetector** library by using [Library Manager](https://docs.platformio.org/en/latest/librarymanager/). Search for ESP_DoubleResetDetector in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
63+
4. Use included [platformio.ini](platformio/platformio.ini) file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at [Project Configuration File](https://docs.platformio.org/page/projectconf.html)
6164

62-
1. Add EEPROM and SPIFFS support, besides RTC memory, for ESP8266
63-
2. Add SPIFFS support, besides EEPROM, for ESP32
65+
---
6466

6567
#### PURPOSE:
6668

67-
Detects a double reset so that an alternative start-up mode can be used. One example use is to allow re-configuration of a device's wifi credentials.
69+
**Detects a double reset so that an alternative start-up mode can be used**. One example use is to allow re-configuration of a device's wifi credentials.
6870

69-
#### Usage
71+
#### HOWTO Usage
7072

7173
How to use
7274

@@ -147,19 +149,92 @@ void loop()
147149
drd->loop();
148150
}
149151
```
152+
---
153+
---
154+
155+
### Examples:
156+
157+
1. [ConfigOnDoubleReset](examples/ConfigOnDoubleReset)
158+
2. [minimal](examples/minimal)
159+
160+
### Examples from other libraries
161+
162+
#### [ESP_WiFiManager Library](https://github.com/khoih-prog/ESP_WiFiManager)
163+
164+
3. [ConfigOnDoubleReset](https://github.com/khoih-prog/ESP_WiFiManager/tree/master/examples/ConfigOnDoubleReset)
165+
4. [ESP32_FSWebServer_DRD](https://github.com/khoih-prog/ESP_WiFiManager/tree/master/examples/ESP32_FSWebServer_DRD)
166+
5. [ESP_FSWebServer_DRD](https://github.com/khoih-prog/ESP_WiFiManager/tree/master/examples/ESP_FSWebServer_DRD)
167+
168+
#### [ESPAsync_WiFiManager Library](https://github.com/khoih-prog/ESPAsync_WiFiManager)
169+
170+
6. [Async_ConfigOnDoubleReset](https://github.com/khoih-prog/ESPAsync_WiFiManager/tree/master/examples/Async_ConfigOnDoubleReset)
171+
7. [Async_ConfigOnDRD_FS_MQTT_Ptr](https://github.com/khoih-prog/ESPAsync_WiFiManager/tree/master/examples/Async_ConfigOnDRD_FS_MQTT_Ptr)
172+
8. [Async_ESP32_FSWebServer_DRD](https://github.com/khoih-prog/ESPAsync_WiFiManager/tree/master/examples/Async_ESP32_FSWebServer_DRD)
173+
9. [Async_ESP_FSWebServer_DRD](https://github.com/khoih-prog/ESPAsync_WiFiManager/tree/master/examples/Async_ESP_FSWebServer_DRD)
174+
175+
---
176+
177+
#### And many other libraries are depending on this DRD feature
178+
179+
All examples of these following libraries are using DRD feature of this [ESP_DoubleResetDetector Library](https://github.com/khoih-prog/ESP_DoubleResetDetector)
180+
181+
1. [Blynk_WM](https://github.com/khoih-prog/Blynk_WM),
182+
2. [BlynkESP32_BT_WF](https://github.com/khoih-prog/BlynkESP32_BT_WF),
183+
3. [Blynk_GSM_Manager](https://github.com/khoih-prog/Blynk_GSM_Manager),
184+
4. [Blynk_Async_WM](https://github.com/khoih-prog/Blynk_Async_WM),
185+
5. [Blynk_Async_ESP32_BT_WF](https://github.com/khoih-prog/Blynk_Async_ESP32_BT_WF),
186+
6. [Blynk_Async_GSM_Manager](https://github.com/khoih-prog/Blynk_Async_GSM_Manager),
150187

151-
Also see examples:
152-
1. [ConfigOnDoubleReset](examples/ConfigOnDoubleReset)
153-
2. [minimal](examples/minimal)
188+
and many more.
189+
190+
---
191+
192+
### Releases
193+
194+
### Releases v1.0.3
195+
196+
1. Update to use the new LittleFS for ESP8266 core 2.7.1+
197+
2. Update [minimal example](examples/minimal)
198+
199+
#### Releases v1.0.2
200+
201+
1. Fix bug by left-over cpp file.
202+
2. Fix bug in example.
203+
3. Enhance README.md
204+
205+
#### Releases v1.0.1
206+
207+
1. Add EEPROM and SPIFFS support, besides RTC memory, for ESP8266
208+
2. Add SPIFFS support, besides EEPROM, for ESP32
209+
210+
---
154211

155212
### TO DO
156213

157214
1. Search for bug and improvement.
158215
2. Similar features for Arduino (UNO, Mega, etc...)
159216

217+
---
218+
219+
### Issues
220+
221+
Submit issues to: [ESP_DoubleResetDetector issues](https://github.com/khoih-prog/ESP_DoubleResetDetector/issues)
222+
223+
---
224+
160225
### Contributions and thanks
161226

162-
1. Thanks to [zobix](https://github.com/zobix) for report the bug in [Isssue 2](https://github.com/khoih-prog/ESP_DoubleResetDetector/issues/2)
227+
1. Thanks to [Stephen Denne](https://github.com/datacute) for the [`DoubleResetDetector library`](https://github.com/datacute/DoubleResetDetector) this library is based upon.
228+
2. Thanks to [zobix](https://github.com/zobix) for report the bug in [Isssue 2](https://github.com/khoih-prog/ESP_DoubleResetDetector/issues/2)
229+
230+
<table>
231+
<tr>
232+
<td align="center"><a href="https://github.com/datacute"><img src="https://github.com/datacute.png" width="100px;" alt="datacute"/><br /><sub><b>⭐️ Stephen Denne</b></sub></a><br /></td>
233+
<td align="center"><a href="https://github.com/zobix"><img src="https://github.com/zobix.png" width="100px;" alt="zobix"/><br /><sub><b>zobix</b></sub></a><br /></td>
234+
</tr>
235+
</table>
236+
237+
---
163238

164239
### Contributing
165240
If you want to contribute to this project:
@@ -168,5 +243,14 @@ If you want to contribute to this project:
168243
- Create issues and pull requests
169244
- Tell other people about this library
170245

246+
---
247+
248+
### License
249+
250+
- The library is licensed under [MIT](https://github.com/khoih-prog/ESP_DoubleResetDetector/blob/master/LICENSE)
251+
252+
---
253+
171254
### Copyright
255+
172256
Copyright 2019- Khoi Hoang

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ESP_DoubleResetDetector",
33
"version": "1.0.3",
4-
"keywords": "rtc,eeprom,littlefs,spiffs,reset,data,esp32,esp8266",
4+
"keywords": "device,control,rtc,eeprom,littlefs,spiffs,reset,data,esp32,esp8266",
55
"description": "Library to detect a double reset, using RTC Memory, EEPROM, LittleFS or SPIFFS for ESP8266 and EEPROM and SPIFFS for ESP32",
66
"authors":
77
{

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ maintainer=Khoi Hoang <[email protected]>
55
license=MIT
66
sentence=Library to detect a double reset, using RTC Memory, EEPROM, LittleFS or SPIFFS for ESP8266 and EEPROM and SPIFFS for ESP32
77
paragraph=An alternative start-up mode can be used. One example use is to allow re-configuration of device's wifi credentials.
8-
category=Device Control
8+
category=Device,Control
99
url=https://github.com/khoih-prog/ESP_DoubleResetDetector
1010
architectures=esp8266,esp32

platformio/platformio.ini

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
;PlatformIO Project Configuration File
2+
;
3+
; Build options: build flags, source filter
4+
; Upload options: custom upload port, speed and extra flags
5+
; Library options: dependencies, extra library storages
6+
; Advanced options: extra scripting
7+
;
8+
; Please visit documentation for the other options and examples
9+
; https://docs.platformio.org/page/projectconf.html
10+
11+
[platformio]
12+
; ============================================================
13+
; chose environment:
14+
; ESP8266
15+
; ESP32
16+
; ============================================================
17+
default_envs = ESP8266
18+
;default_envs = ESP32
19+
20+
[env]
21+
; ============================================================
22+
; Serial configuration
23+
; choose upload speed, serial-monitor speed
24+
; ============================================================
25+
upload_speed = 921600
26+
;upload_port = COM11
27+
;monitor_speed = 9600
28+
;monitor_port = COM11
29+
30+
lib_deps =
31+
Blynk@~0.6.1
32+
ESP_DoubleResetDetector@~1.0.3
33+
34+
build_flags =
35+
; set your debug output (default=Serial)
36+
-D DEBUG_ESP_PORT=Serial
37+
; comment the folowing line to enable WiFi debugging
38+
-D NDEBUG
39+
40+
[env:ESP8266]
41+
platform = espressif8266
42+
framework = arduino
43+
; ============================================================
44+
; Board configuration
45+
; choose your board by uncommenting one of the following lines
46+
; ============================================================
47+
;board = gen4iod
48+
;board = huzzah
49+
;board = oak
50+
;board = esp_wroom_02
51+
;board = espduino
52+
;board = espectro
53+
;board = espino
54+
;board = espresso_lite_v1
55+
;board = espresso_lite_v2
56+
;board = esp12e
57+
;board = esp01_1m
58+
;board = esp01
59+
;board = esp07
60+
;board = esp8285
61+
;board = heltec_wifi_kit_8
62+
;board = inventone
63+
;board = nodemcu
64+
board = nodemcuv2
65+
;board = modwifi
66+
;board = phoenix_v1
67+
;board = phoenix_v2
68+
;board = sparkfunBlynk
69+
;board = thing
70+
;board = thingdev
71+
;board = esp210
72+
;board = espinotee
73+
;board = d1
74+
;board = d1_mini
75+
;board = d1_mini_lite
76+
;board = d1_mini_pro
77+
;board = wifi_slot
78+
;board = wifiduino
79+
;board = wifinfo
80+
;board = wio_link
81+
;board = wio_node
82+
;board = xinabox_cw01
83+
;board = esp32doit-devkit-v1
84+
85+
[env:ESP32]
86+
platform = espressif32
87+
framework = arduino, espidf
88+
; ============================================================
89+
; Board configuration
90+
; choose your board by uncommenting one of the following lines
91+
; ============================================================
92+
;board = esp32cam
93+
;board = alksesp32
94+
;board = featheresp32
95+
;board = espea32
96+
;board = bpi-bit
97+
;board = d-duino-32
98+
board = esp32doit-devkit-v1
99+
;board = pocket_32
100+
;board = fm-devkit
101+
;board = pico32
102+
;board = esp32-evb
103+
;board = esp32-gateway
104+
;board = esp32-pro
105+
;board = esp32-poe
106+
;board = oroca_edubot
107+
;board = onehorse32dev
108+
;board = lopy
109+
;board = lopy4
110+
;board = wesp32
111+
;board = esp32thing
112+
;board = sparkfun_lora_gateway_1-channel
113+
;board = ttgo-lora32-v1
114+
;board = ttgo-t-beam
115+
;board = turta_iot_node
116+
;board = lolin_d32
117+
;board = lolin_d32_pro
118+
;board = lolin32
119+
;board = wemosbat
120+
;board = widora-air
121+
;board = xinabox_cw02
122+
;board = iotbusio
123+
;board = iotbusproteus
124+
;board = nina_w10

0 commit comments

Comments
 (0)