Page 1 of 1

Moonlight's with Dimming Module

Posted: Wed Feb 17, 2016 9:50 am
by oftheangels
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:

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() );
}

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

Re: Moonlight's with Dimming Module

Posted: Wed Feb 17, 2016 4:13 pm
by lnevo
Maybe its getting set elsewhere? Code looks fine...

Re: Moonlight's with Dimming Module

Posted: Thu Feb 18, 2016 8:39 am
by oftheangels
Thanks for the response... That is the only place that channel 0 is getting set in my code. Is it possible I need to reboot my RA? BTW) Is there a way to do a reboot that does not require unplugging it?

Re: Moonlight's with Dimming Module

Posted: Thu Feb 18, 2016 8:51 am
by lnevo
If you have wireless you can do /boot to bounce it.