More than one time interval for port

Do you have a question on how to do something.
Ask in here.
Post Reply
Armetas
Posts: 82
Joined: Sat Mar 29, 2014 1:55 pm

More than one time interval for port

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

Re: More than one time interval for port

Post 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 );
Roberto.
Armetas
Posts: 82
Joined: Sat Mar 29, 2014 1:55 pm

Re: More than one time interval for port

Post 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 ;)
Image
Post Reply