Setting a port to multiple on/off times

Do you have a question on how to do something.
Ask in here.
Post Reply
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Setting a port to multiple on/off times

Post by Appleseed »

Hi all

I am trying to set port4 on my RA+ to turn on at 8am and off at 15, then on at 4pm and off at 1am

I tried the following but it doesnt work

if (hour(now())<12)
ReefAngel.StandardLights( Port4,8,0,15,0 );
else
ReefAngel.StandardLights( Port4,16,0,1,0 );

any ideas/pointers would be greatly appreciated.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Setting a port to multiple on/off times

Post by rimai »

Try < 16 instead of < 12
Roberto.
Appleseed
Posts: 86
Joined: Sat Jun 30, 2012 9:21 am

Re: Setting a port to multiple on/off times

Post by Appleseed »

thanks Roberto, that seems to have done the trick!
Image
Post Reply