- Sun Apr 17, 2016 3:53 pm
#45654
@martinayotte, thanks I used a 1K on the only deep sleep test I did but had not thought about manualy waking an ESP to re-flash it. I my have misread the spec (if so I'm sorry) but I read it as to be able to clear exsisting stored WiFi infomation by detecting a long button press (this my not be needed). Unless the ESP is going to need to be manualy reset on frequent occations (which could be done by power cycling) the reset pin is not needed. As we can detect the difference between a reboot due to waking from sleep and a reboot from grounding reset pin, the code could check for the reason for rebooting and clear the settings or skip that continue as normal. This would save a GPIO.
So:
Power up with GPIO 0 low - boots into flash mode.
Power up - boots - runs normal code.
Wake from sleep - boots - runs normal code.
Reset grounded - boots - runs erase WiFi data code.
Edit: links to other posts for checking reboot / reset reason.
viewtopic.php?f=32&t=4819&start=5viewtopic.php?p=26862https://github.com/devicehive/esp8266-f ... nterface.h
Last edited by Barnabybear on Mon Apr 18, 2016 1:31 am, edited 1 time in total.