|
Re: WPI Lib Relay class - individual line control
We are doing something similar, and fortunately have a good Controls person to translate the h/w to s/w requirements. I don't have access to the code until we get back to the Verizon today - but we are doing something like this.
One relay has two LEDs, and one relay has one. On the two one, you create it, set the direction to both, and then by setting the value to either forward or backward, it turns one or the other on and the other off (toggle mode). Or you can set it off to turn both off.
For the relay with only one LED, we set the direction to forward(?) and then turn it on or off. Or something like that (I'm not as sure for this one).
Sorry I can't post the code at this point to make it work - but maybe this will help. If you use the output on the dashboard for the relays, you can see the two little lights (one above each other) go green and red as you set the state for which line is on and off.
|