Port time on

Do you have a question on how to do something.
Ask in here.
Post Reply
palmer
Posts: 24
Joined: Thu Mar 29, 2012 7:57 pm

Port time on

Post 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);
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Port time on

Post by rimai »

What is the schedule you are trying to create?
Roberto.
palmer
Posts: 24
Joined: Thu Mar 29, 2012 7:57 pm

Re: Port time on

Post by palmer »

I am looking to turn on the port every 6 hours for about 10 mins ---
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Port time on

Post by rimai »

Try this:

Code: Select all

ReefAngel.Relay.Set(Port4, now()%21600<600);
Roberto.
palmer
Posts: 24
Joined: Thu Mar 29, 2012 7:57 pm

Re: Port time on

Post 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)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Port time on

Post by rimai »

That's already there from your wizard code, right?
Roberto.
palmer
Posts: 24
Joined: Thu Mar 29, 2012 7:57 pm

Re: Port time on

Post by palmer »

i did the wizard but it didn't take - tried 4 times
palmer
Posts: 24
Joined: Thu Mar 29, 2012 7:57 pm

Re: Port time on

Post by palmer »

Rimai- could this work??

ReefAngel.Relay.Set(Port4, now()%21600<600);
if (ReefAngel.DisplayedMenu==WATERCHANGE_MODE) ReefAngel.Relay.On(Port4);
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Port time on

Post by lnevo »

That should work
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Port time on

Post by rimai »

I misunderstood the question. Sorry.
I thought you wanted to turn it off and not turn it on.
Yeah, that should work.
Roberto.
palmer
Posts: 24
Joined: Thu Mar 29, 2012 7:57 pm

Re: Port time on

Post by palmer »

awesome both execution works!!!
Finished setting up till I get the RF to control me Vortech
Post Reply