Moonlight's with Dimming Module
Posted: Wed Feb 17, 2016 9:50 am
I'm having a bit of an issue with my moonlight's. I have a Dimming module that connects to an I/O expansion module that is connected directly to the RA+. The moonlight's are staying on throughout the day even though I explicitly try and turn them off. My code is below:
By using the serial port monitor I can see that it is daytime. I would expect setting the channel to 0 should turn it off.
Any advice on an alternative? Thanks in advance.
-LeoD
Code: Select all
void setMoon()
{
#ifdef debug_lights == 1
Serial.print("Daylight: ");
Serial.print(sunLocation.IsDaytime());
Serial.print(" MoonPhase: ");
Serial.print(MoonPhase());
Serial.println();
#endif
if (sunLocation.IsDaytime())
ReefAngel.PWM.SetChannel(0, 0);
else
ReefAngel.PWM.SetChannel( 0, MoonPhase() );
}
Any advice on an alternative? Thanks in advance.
-LeoD