Page 1 of 1
water change ports on 2nd expansion?
Posted: Thu Jun 30, 2011 5:07 pm
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?
Re: water change ports on 2nd expansion?
Posted: Thu Jun 30, 2011 7:12 pm
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
Re: water change ports on 2nd expansion?
Posted: Thu Jun 30, 2011 7:18 pm
by chrome
Perfect, exactly what I was looking for.
Thanks!