Issue:
When taking the initial voltage reading after first powering on, voltage hasn't had chance to stabilize so the reading can be inaccurate, which in turn may incorrectly trigger the low-power preset. (Manifests when the user has selected a low read interval and/or is using a capacitor).
Resolution:
A non-blocking, fixed 10 second delay has been added to the initial voltage reading to give the voltage time to stabilize.
This is a reworked version of the (now closed) PR here:
https://github.com/Aircoookie/WLED/pull/3959
- Rebased the update for 0_15.
- Added a constant so the delay can be modified via my_config.h.
- Small adjustments to make the PR compatible again after the recent restructuring in this PR: (https://github.com/Aircoookie/WLED/pull/3003).
Thankyou!
* added missing pinMode(.., INPUT) on esp32
* do not try reading from pin = -1 (ESP32-S2 shows very allergic reactions to this)
* Info page - show "n/a" when pin = -1
* readme: esp32 default pin = 35