The Planted Tank Forum - View Single Post - Hunter X's Arduino Whole Tank Controller (52K Warning)
View Single Post
post #167 of (permalink) Old 03-23-2014, 10:51 AM Thread Starter
Planted Tank Obsessed
HunterX's Avatar
Join Date: May 2012
Location: Springfield MO
Posts: 396
Originally Posted by Fluffles View Post
Thanks for posting you code Hunter. I finally had time to go through it today and I think I have a better idea of how I'm going to code my scheduler.
It's very easy to follow and well commented, thanks again.

I do have a question tho. Say that your powerhead #1 (relay3) automatically turns off at 5pm. What happens if you want to manually turn it on after 5pm?

Not sure if I read the code correctly or understand it completely, but it seems like your buttons can either turn a relay off OR allow the scheduler to take over. Do you consider the opposite where you might want force a relay on?

That's where I ran into the problem and started coding 3 states for each button: ON-OFF-AUTO (unless you don't care about forcing a relay ON)
You make a great point. I didn't think about needing to "force" a relay on. I think this can be done pretty easy by adding another "if" statement to the "if" statement that shuts the relay off. It would just ask it to check the Boolean to see if it is true. If it's true, turn the relay on. Let me play with it and I'll get something back to you. Thanks for pointing that out.

Last edited by HunterX; 03-23-2014 at 12:09 PM. Reason: sp
HunterX is offline  
For the best viewing experience please update your browser to Google Chrome