Lights On override and Dimmer expansion module

Related to the development libraries, released by Curt Binder
Post Reply
dedvalson
Posts: 140
Joined: Tue Oct 04, 2011 5:49 am

Lights On override and Dimmer expansion module

Post 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
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Lights On override and Dimmer expansion module

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Lights On override and Dimmer expansion module

Post by rimai »

This is only available for the standard channels. You will need to code for the dimming channels.
Roberto.
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Lights On override and Dimmer expansion module

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

?
User avatar
joshlawless
Posts: 138
Joined: Thu May 23, 2013 2:52 pm

Re: Lights On override and Dimmer expansion module

Post by joshlawless »

Looks like I found it (pasting here for posterity):

Code: Select all

    if (bitRead(ReefAngel.StatusFlags,LightsOnFlag)) 
Post Reply