- Tue Aug 30, 2016 2:54 am
#54111
due to "housekeeping" the esp is not the fastest to boot up. But in ~300ms it should be in your setup() and you should be able to check the button. Pressing a button for less than 300ms is pretty quick but hey, if you can't detect a presed button just go to sleep again.
the getResetInfoPtr() etc is code to determine what is the actual cause for the start, esp is pretty talkative about this: power up, watchdog, rst_pin, reset from deep_sleep, ...
shortly removing high on chpd (disregarding of former state) is the same as powering up,
aserting reset can be: just simple reset or wakeup from deep-sleep, depending on the former state.