Moonrise/set
Posted: Sat Mar 24, 2012 2:53 pm
If I want to have the moon rise and set as the main lights cycle off, I tried this code to increase the moonlight signal up to the current moonphase at 10 pm, stay on over night at monphase levels and to fade away at 7 am. However, it must not be quite right, when I change the times it doesn't sync up. BTW, I have these moonlights connected to the actinic and daylight connections on the relay box.
-Jon
-Jon
Code: Select all
//Moonlight=byte PWMSlope(byte startHour, byte startMinute, byte endHour, byte endMinute, byte startPWM, byte endPWM, byte Duration, byte oldValue)
ReefAngel.PWM.SetActinic(ActinicPWMValue);
ActinicPWMValue=PWMSlope(22,00,7,00,0,MoonPhase(),60,ActinicPWMValue);
ReefAngel.PWM.SetDaylight(DaylightPWMValue);
DaylightPWMValue=PWMSlope(22,00,7,00,0,MoonPhase(),60,DaylightPWMValue);