A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By Friendroid
#94968 The water dispenser consists of a DC motor that is powered by an 18650 cell and is turned ON by a small chip that pulls the gate of an N-Channel mosfet HIGH when a momentary pushbutton is pressed (shorting Pin2 of the chip to ground). The following press turns the pump off.

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
You do not have the required permissions to view the files attached to this post.