water change ports on 2nd expansion?

Related to the development libraries, released by Curt Binder
Post Reply
chrome
Posts: 27
Joined: Thu May 26, 2011 6:28 am

water change ports on 2nd expansion?

Post by chrome »

How do you expand on this:

Code: Select all

ReefAngel.WaterChangePorts = B10000011;
to work with a 2nd relay box? For example if I want to turn off Port 2 on the 2nd relay box, how would I do that?

In addition, does this also recognize the DelayedOn?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: water change ports on 2nd expansion?

Post by binder »

chrome wrote:How do you expand on this:

Code: Select all

ReefAngel.WaterChangePorts = B10000011;
to work with a 2nd relay box? For example if I want to turn off Port 2 on the 2nd relay box, how would I do that?
You would do it like this:

Code: Select all

// shutoff 2nd port on 2nd relay box (or 1st expansion box)
ReefAngel.WaterChangePortsE[0] = B00000010;
The number inside the bracket is 1 less than the expansion relay devices installed. So, the code above works for the 1st expansion relay box just like with the standard WaterChangePorts. The other FeedingModePorts, OverheatShutoffPorts and LightsOnPorts all work the same way. You add an E and a [0] to the end of them.

Code: Select all

ReefAngel.FeedingModePortsE[0];
ReefAngel.OverheatShutoffPortsE[0];
ReefAngel.LightsOnPortsE[0];
All of the above code reference the 1st expansion relay box.
chrome wrote: In addition, does this also recognize the DelayedOn?
Yes, DelayedOn works on all the expansion relays too.

curt
chrome
Posts: 27
Joined: Thu May 26, 2011 6:28 am

Re: water change ports on 2nd expansion?

Post by chrome »

Perfect, exactly what I was looking for.

Thanks!
Post Reply