Day of Month Functuion

Do you have a question on how to do something.
Ask in here.
Post Reply
tmoore103
Posts: 12
Joined: Wed Nov 11, 2015 3:30 pm

Day of Month Functuion

Post by tmoore103 »

Hey guys,

Is there a simple way to change the duration that my actinic lights are on according to what day in the month it is? I don't have a dimmable light so I'm not looking for anything complicated. I'm only hoping to be able to change the light schedule.

Here is what I was trying to do:

Code: Select all

if (day()>=1- && day()<5)
 {
   ReefAngel.StandardLights( Port3,21,0,12,0 );//Dual Actinic
 }
 else if (day()>=5 && day()<10)
 {
ReefAngel.StandardLights( Port3,20,30,1,0 );//Dual Actinic
 }
 else if (hour()>=10 && hour()<15)
 {
ReefAngel.StandardLights( Port3,20,0,1,30 );//Dual Actinic
 }
 else if (day()>=15 && day()<20)
 {
ReefAngel.StandardLights( Port3,19,30,2,30 );//Dual Actinic
 }
 else if (day()>=20 && day()<25)
 {
ReefAngel.StandardLights( Port3,20,0,2,0 );//Dual Actinic
 }
  else if (day()>=25 && day()<30)
 {
ReefAngel.StandardLights( Port3,20,30,1,0 );//Dual Actinic
 }
  else
 {
ReefAngel.StandardLights( Port3,21,30,12,30 );//Dual Actinic
 }
I uses something similar for my wave makers throughout the day but it is according to the hour:

Code: Select all

 if (hour()>=8 && hour()<9)
 {
  ReefAngel.PWM.SetDaylight( ReefCrestMode(7,5,true) ); // reefcrest at 46% +/- 10% on sync mode  (night Mode)
  ReefAngel.PWM.SetActinic( ReefCrestMode(37,5,false) ); // reefcrest at 5% +/- 5% on sync mode  (night mode)
 }
 else if (hour()>=9 && hour()<10)
 {
  ReefAngel.PWM.SetDaylight( LongPulseMode(0,35,20,true) ); // Long pulse at 40% with 5s pulse on sync mode
  ReefAngel.PWM.SetActinic( LongPulseMode(0,35,20,false) ); // Long pulse at 40% with 5s pulse on Anti-sync mode
 }
I'm hoping I'm just not using the correct terminology for the day of the month.

Thanks in advance!
tmoore103
Posts: 12
Joined: Wed Nov 11, 2015 3:30 pm

Re: Day of Month Functuion

Post by tmoore103 »

Sorry, I think this code may actually work.

:D I just notice a errant - in the first line that was keeping it from compiling.

Code: Select all

if (day()>=1- && day()<5)
I'm still open to a better method if someone has one.
Post Reply