Page 1 of 1

Lights On override and Dimmer expansion module

Posted: Wed Apr 01, 2015 10:57 am
by dedvalson
Hi,

I was going to write some custom code for this, but I wanted to see if there is something standard for it already. If there is I haven't been able to find it.

I don't have any relays related to lighting. All of my lighting is controlled strictly from the 6 channel dimming expansion module (I use all 6 channels for Lighting).

I need the "LightsOn" override to turn these 6 dimming channels to some preset values, overriding what is being done by the normal code loop.

I can see how I could easily do this by checking for the override in my main loop, but I wondered if there was something built in for this.

Don

Re: Lights On override and Dimmer expansion module

Posted: Wed Apr 01, 2015 11:24 am
by Sacohen
I'm not sure if there is or not, but it's something I will need too, so I'm following along to see what comes up.

Re: Lights On override and Dimmer expansion module

Posted: Wed Apr 01, 2015 12:34 pm
by rimai
This is only available for the standard channels. You will need to code for the dimming channels.

Re: Lights On override and Dimmer expansion module

Posted: Tue May 03, 2016 9:32 pm
by joshlawless
Is there a way to check, in the code, whether the LightsOn mode is active?

Something like:

If ReefAngel.AreLightsOn() {ReefAngel.PWM.Set16ChannelRaw( 0, 4095)}
else {ReefAngel.PWM.Set16ChannelRaw( 0, PWMSmoothRampHighestRes( 7, 15, 22, 00, 0, 4095, 130, 0 ) );}

?

Re: Lights On override and Dimmer expansion module

Posted: Tue May 03, 2016 9:42 pm
by joshlawless
Looks like I found it (pasting here for posterity):

Code: Select all

    if (bitRead(ReefAngel.StatusFlags,LightsOnFlag))