Coder Social home page Coder Social logo

doubleresetdetector's Introduction

Double Reset Detector

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

doubleresetdetector's People

Contributors

datacute avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

doubleresetdetector's Issues

ESP32?

Will this work in an ESP32?

small error when compiling with paltformio

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();

Get more users for this library

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.

https://youtu.be/l9Gl1yKvMNg

How to prevent Restart on first press?

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?

Adding Double Reset Detector As An example To WiFi Manager

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:-

  1. If the power supply is flaky it can be detected as a double reset and go into configuration mode.
  2. The device freezes for the double reset detection interval which in the example is 10 seconds.

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.

Nodemcu flash button ?

Hi. this is nice library but how can I define nodemcu flash button to resetting configuration ?

thanks

Incredibly useful

We can have two programs running, it's just a matter of booting into one or another, awesome stuff, thanks a lot!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.