Moonlight's with Dimming Module

Do you have a question on how to do something.
Ask in here.
Post Reply
oftheangels
Posts: 43
Joined: Sat Nov 21, 2015 10:34 am
Location: Dallas

Moonlight's with Dimming Module

Post 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
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Moonlight's with Dimming Module

Post by lnevo »

Maybe its getting set elsewhere? Code looks fine...
oftheangels
Posts: 43
Joined: Sat Nov 21, 2015 10:34 am
Location: Dallas

Re: Moonlight's with Dimming Module

Post 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?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Moonlight's with Dimming Module

Post by lnevo »

If you have wireless you can do /boot to bounce it.
Post Reply