Page 1 of 1

More than one time interval for port

Posted: Thu Apr 10, 2014 12:05 pm
by Armetas
Hi,

I want to have 3 time intervals for my lightning, I see code in my RA+:

ReefAngel.StandardLights( Box1_Port1,10,0,22,0 );

Can I make 3 ones like:

ReefAngel.StandardLights( Box1_Port1,9,30,13,30 );
ReefAngel.StandardLights( Box1_Port1,14,30,18,30 );
ReefAngel.StandardLights( Box1_Port1,19,30,21,30 );

Is this correct or I need to do something else?

Thanks

Re: More than one time interval for port

Posted: Thu Apr 10, 2014 12:13 pm
by rimai
Not on the same port.
If you want to do in the same port, you will need some conditional if statements.
Something like this:

Code: Select all

if (hour()<14)
  ReefAngel.StandardLights( Box1_Port1,9,30,13,30 );
elseif (hour()>=14 && hour()<19)
  ReefAngel.StandardLights( Box1_Port1,14,30,18,30 );
else
  ReefAngel.StandardLights( Box1_Port1,19,30,21,30 );

Re: More than one time interval for port

Posted: Thu Apr 10, 2014 12:21 pm
by Armetas
rimai wrote:Not on the same port.
If you want to do in the same port, you will need some conditional if statements.
Something like this:

Code: Select all

if (hour()<14)
  ReefAngel.StandardLights( Box1_Port1,9,30,13,30 );
elseif (hour()>=14 && hour()<19)
  ReefAngel.StandardLights( Box1_Port1,14,30,18,30 );
else
  ReefAngel.StandardLights( Box1_Port1,19,30,21,30 );
Thanks Roberto ;)