Quote:
Originally Posted by DavisC
Yes the switch is on the robot connected to DIO port 1 on the DSC.
|
Not sure if this is what you are looking for, but as an example we have a switch used as a travel limit to stop a motor. It's used as follows:
DigitalInput *bBallElevatorTopLimit;
...
bBallElevatorTopLimit = new DigitalInput(2,2);
...
// if top limit clicked
if (!bBallElevatorTopLimit->Get())
...
the switch reports 1 when it is open and 0 when closed because we wired the switch signal to ground on the DSC.
Hopefully that helps!