I would like to have an esp8266 turning the mosfet ON once a day for a few minutes. I chose the esp8266 because of its low deep sleep current and because I'd like to play with its WiFi capabilities.
But I would like to start easy: when I power the device, I'd like to be able to visit a webpage on my phone and set for how long the gate of the mosfet should be HIGH and how long should the deep sleep be. After pressing OK, the device should dispense water and go to sleep. Once it wakes up again, there is no need for WIFI to be ON again (only if I power OFF and power ON again).
As far as I understand, I'd have to set a flag just after setup is completed, so the next time the esp8266 wakes up, it will know it's not "first boot". I am not sure how to do this, do I need to write it to EEPROM then read it back after waking up?
I'd appreciate some help because I'm not very proficient in C++.
Thank you