Lights On override and Dimmer expansion module

Related to the development libraries, released by Curt Binder

Posts: 140
Joined: Tue Oct 04, 2011 5:49 am
PostPosted: Wed Apr 01, 2015 10:57 am

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.

User avatar
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL
PostPosted: Wed Apr 01, 2015 11:24 am
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.

Posts: 12457
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Wed Apr 01, 2015 12:34 pm
This is only available for the standard channels. You will need to code for the dimming channels.
User avatar
Posts: 138
Joined: Thu May 23, 2013 2:52 pm
PostPosted: Tue May 03, 2016 9:32 pm
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
Posts: 138
Joined: Thu May 23, 2013 2:52 pm
PostPosted: Tue May 03, 2016 9:42 pm
Looks like I found it (pasting here for posterity):

Code: Select all
    if (bitRead(ReefAngel.StatusFlags,LightsOnFlag))

Return to Development Libraries

Who is online

Users browsing this forum: No registered users and 2 guests