Page 1 of 1
Port time on
Posted: Thu Aug 06, 2015 3:40 pm
by palmer
I got this code here to turn on port 4 at specific times- I would like to run the port for more than the 1 min, how can I adjust it??
if ( ( (hour()==12) && (minute()==30) ) || ( (hour()==23) && (minute() ==30) ) || ( (hour()==6) && (minute() ==30) ) )
ReefAngel.Relay.On(Port4);
else
ReefAngel.Relay.Off(Port4);
Re: Port time on
Posted: Thu Aug 06, 2015 6:13 pm
by rimai
What is the schedule you are trying to create?
Re: Port time on
Posted: Thu Aug 06, 2015 6:49 pm
by palmer
I am looking to turn on the port every 6 hours for about 10 mins ---
Re: Port time on
Posted: Thu Aug 06, 2015 9:27 pm
by rimai
Try this:
Code: Select all
ReefAngel.Relay.Set(Port4, now()%21600<600);
Re: Port time on
Posted: Fri Aug 07, 2015 3:56 pm
by palmer
I would also like to turn on the port 4 in water change mode or ( be opposite of port 1, which is always on)
Re: Port time on
Posted: Fri Aug 07, 2015 4:41 pm
by rimai
That's already there from your wizard code, right?
Re: Port time on
Posted: Fri Aug 07, 2015 7:05 pm
by palmer
i did the wizard but it didn't take - tried 4 times
Re: Port time on
Posted: Sat Aug 08, 2015 3:54 am
by palmer
Rimai- could this work??
ReefAngel.Relay.Set(Port4, now()%21600<600);
if (ReefAngel.DisplayedMenu==WATERCHANGE_MODE) ReefAngel.Relay.On(Port4);
Re: Port time on
Posted: Sat Aug 08, 2015 7:00 am
by lnevo
That should work
Re: Port time on
Posted: Sat Aug 08, 2015 8:27 am
by rimai
I misunderstood the question. Sorry.
I thought you wanted to turn it off and not turn it on.
Yeah, that should work.
Re: Port time on
Posted: Sat Aug 08, 2015 3:54 pm
by palmer
awesome both execution works!!!
Finished setting up till I get the RF to control me Vortech