Library to detect a double reset, using ESP8266 RTC Memory
PURPOSE: 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.
LICENCE: MIT
Library to detect a double reset, using ESP8266 RTC User Memory
License: MIT License
Will this work in an ESP32?
https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ
Basically i think you would need to just a properties file and move the code into a src folder and do a release.
Here is an example properties file
https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot/blob/master/library.properties
I could push a PR with the changes if you want (but I would need a contact email to put in the Maintainer field)
Hi
I get this "error" when compiling with platformio.
Is there a way to fix this?
.pio/libdeps/d1_mini/DoubleResetDetector_ID1679/src/DoubleResetDetector.cpp: In member function 'void DoubleResetDetector::loop()': .pio/libdeps/d1_mini/DoubleResetDetector_ID1679/src/DoubleResetDetector.cpp:34:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (waitingForDoubleReset && millis() > timeout) stop();
I think this library is really excellent and deserves more attention then it gets!
I've created a video around this library hopefully it helps raise awareness of it. I only have a pretty small channel but hopefully it helps! I'll also make a post to instructables over the next few days.
I would like to use your library to perform "factory reset" so some code needs to be run in order to erase data after double clicking reset button.
But the problem is, that upon first press device is restarted so actually it never catch double press of reset button. How do I prevent this restart?
Using a double reset to go into WiFi configuration mode which was mentioned at tzapu/WiFiManager#160 (comment) is a great concept. This has the advantage that human intervention is required to initiate WiFi configuration but avoids the requirement of an extra button to initiate WiFi configuration.
I can see two issues though:-
If this was done with RTC memory rather than SPIFFS the record of a reset disappears in the case of a power outage but remains when the reset button is pushed. This would eliminate issue 1.
Perhaps issue 2 wouldn't be too bad if the double reset time was short, say half a second, or maybe the reset flag could be cleared with a timer and callback so it is non blocking.
I'd like to add an example using using a double reset to go into WiFi configuration mode to the version of WiFiManager at https://github.com/kentaylor/WiFiManager, ideally with your help.
Hi. this is nice library but how can I define nodemcu flash button to resetting configuration ?
thanks
When connecting Wemos D1 mini via USB drd.detectDoubleReset() returns true.
Any idea why this is happening?
[DELETED]
According to ESP8266 documentation the first 256 bytes in the RTC are reserved for the system. I suggest to change the example to write to address 64 (the addressing is done in 4byte steps). See ESP8266 SDK API Guide page 19.
The library.properties file in version 1.0.0 contains this line:
version=0.0.2
We can have two programs running, it's just a matter of booting into one or another, awesome stuff, thanks a lot!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.