Setting a port to multiple on/off times

Do you have a question on how to do something.
Ask in here.

Posts: 69
Joined: Sat Jun 30, 2012 9:21 am
PostPosted: Sun Oct 31, 2021 7:43 am
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

Posts: 12815
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Nov 01, 2021 9:56 am
Try < 16 instead of < 12
Roberto.

Posts: 69
Joined: Sat Jun 30, 2012 9:21 am
PostPosted: Tue Nov 02, 2021 9:44 am
thanks Roberto, that seems to have done the trick!
Image

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 6 guests