It seems that my moonlights are always the same intensity, full on, even tho I use moonphase()...I have them plugged into my dimming actinic and daylight channels...Do I have this coded wrong?
// PWMSlope based on Internal Memory values for Standard Lights
ReefAngel.PWM.ActinicPWMSlope();
ReefAngel.PWM.DaylightPWMSlope();
if ((hour() >= 5) || (hour() <= 22)) //from 10 pm to 5 am the moonlights will be on
{
ReefAngel.PWM.SetDaylight(MoonPhase());
ReefAngel.PWM.SetActinic(MoonPhase());
}
else
{
ReefAngel.PWM.SetDaylight(0); //from 5 am to 10 pm the moonlights will be off
ReefAngel.PWM.SetActinic(0);
}
...and while they turned on at the right time, they did not go off this morning at 5, like I thought I had coded...do I have the code right to have the lights go on at 10 pm and off at 5 am?
Thanks
I don't think your logic is right.
Your logic will always be true. It will always be >=5 or <=22.
You need <=5 || >=22
Can you measure the voltage you are getting on the channels?
I dont know how to measure the voltage, I don't have any volt meters or whatever you need...the pwm channels on the portal read 34%...does that give any useful info?
They shouldn't be affecting it because it just gets overridden by your if/else statement, but who knows...??
Do you have any other code that would affect the PWM channels?
I took those lines out and will see what happens tonight...the 3% came from that I didn't have enough space laid out on my screen between the number and the % sign...the % was covering up the 4! LOL
Thanks for the input