Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By simondid
#50988 hey

so i need my esp to be in deepsleep until a button is press this can be don bay setting a crasy amount off deepsleep time and connecting gpio 16 to a button witch is normaly closed and when pressed connection gpio 16 to ground this works but is it a realy bad idear ? shut i use a resistor in seris with the connection to ground ore what is the bedst solution? to also safe gourd aginst long press's ?
User avatar
By Jep
#51110
simondid wrote:this can be don bay setting a crasy amount off deepsleep time

Instead of setting a "crazy amount of time" as you said you can just put 0 value to sleep indefinitely as below:
Code: Select allESP.deepSleep(0);
User avatar
By schufti
#51173 if you don't need periodic (auto) wake-up, you don't need anything with gpio16, just a button for reset.
If you additionally wan't periodic wake up, a resistor (value depending on your pull-up on rst-pin) or schotky-diode between gpio16 and rst is recommended.
(Might also work with small cap 0.1uF, not tested yet)