Forum Discussion
GordonThree
Apr 12, 2018Explorer
Something else to consider, code wise, is the blocking call to Delay() ... that's 15 minutes "wasted" by the cpu, where it's trapped and can't do anything else.
It could be replaced with a for loop, and then you could continue to poll the button, either to extend time, or shut off the pump early, or an external event timer could be used, like the Ticker library, and use a callback function to turn the valve off after a fifteen minute delay.
I like my nodes to always be doing something, even if it's just sending out a heartbeat message every sixty seconds.
It could be replaced with a for loop, and then you could continue to poll the button, either to extend time, or shut off the pump early, or an external event timer could be used, like the Ticker library, and use a callback function to turn the valve off after a fifteen minute delay.
I like my nodes to always be doing something, even if it's just sending out a heartbeat message every sixty seconds.
About DIY Maintenance
RV projects you can tackle on your own with a few friendly pointers.4,352 PostsLatest Activity: Jan 20, 2025