khoih-prog / ESP_DoubleResetDetector

ESP_DoubleResetDetector is a library for the ESP32/ESP8266 Arduino platform to enable trigger configure mode by resetting twice.
MIT License
49 stars 18 forks source link

Not an issue, but a question #9

Closed kbssa closed 3 years ago

kbssa commented 3 years ago

Is that possible to configure the library to detect more than two resets ?

Thanks for the library.

khoih-prog commented 3 years ago

It's totally possible if the library is rewritten, but I won't do it because the library will be over-complex for normal users, who require only DoubleReset.

I'll write two new libraries, named MultiResetDetector (MRD, for ESP32/ESP8266) and MultiResetDetector_Generic (for remaining boards, such as SAMD, nRD52, AVR, STM32, SMA DUE, etc.) with these following capabilities, within several days.

  1. Configurable MRD_TIMEOUT, from 0 to almost infinite (unsigned long) seconds
  2. Configurable MRD_TIMES, from 0 to almost 64K (uint16_t) times
  3. There will be some accurate way to verify, using checksum or numeric check, to be sure it's perfect and expected
  4. The current MRD times and MRD_TIMEOUT will be displayed at every boot time to inform users.

Can you provide more info about your use-case, so that I can tailor the examples to match your expectation ?

Thanks for your interest in this ESP_DoubleResetDetector and your good idea. I'll certainly name you in the contributor's list of the new libraries.

kbssa commented 3 years ago

I think that having the option to configure more than 2 resets is good, because I want to use it to reset the WiFi credentials and that will be activated very easy without the user interaction wilth only 2 resets detection. For example, when occur mains spikes.

Anyway your library is very useful.

Thank you for your fast reply.

khoih-prog commented 3 years ago

New library ESP_MultiResetDetector has been created and published. Please test and enjoy.

Regards,


Releases v1.1.1

  1. Initial coding to support Multiple Reset Detection.
  2. Sync with ESP_DoubleResetDetector v1.1.1

Your idea leading to the new library has been noted in Contributions and Thanks

kbssa commented 3 years ago

New library ESP_MultiResetDetector has been created and published. Please test and enjoy.

Regards,

Releases v1.1.1

  1. Initial coding to support Multiple Reset Detection.
  2. Sync with ESP_DoubleResetDetector v1.1.1

Your idea leading to the new library has been noted in Contributions and Thanks

Ow !! That was fast !

Thank you very much for mentioning my name on the contributor's list of the new libraries.