Programming resources for FIRST Robotics team 1318
Limit switches are simple switches used to sense when two things are physically touching. They are basic electronic devices that complete a circuit (or break a circuit) when the switch is pressed, and break a circuit (or complete it) when released. In WPILib, use a DigitalInput, which returns true or false based on whether the limit switch is pressed.