I’m not very familiar with programming limit switches in VCS using C+. I wiould like to code both states of a limit switch. The only way I have been successful is by coding the “On” state:
if(Autonswitch.pressing())
{
Intakeleft.stop();
Intakeright.stop();
LeftMotor.stop();
RightMotor.stop();
}
This code only activates when the switch is pressed. I follow the code up with a
“else” Statement.
What I would like to do is have a statement that for when it is off, like:
if(Autonswitch.pressing(False))
How do you code this?