A limit switch is a simple digital input that can be in one of two states: pressed or released (aka on and off). The states are determined by whether or not the physical switch is being pressed
Limit switches can be used to prevent a manipulator from going too far. To do this, the limit switch is placed near the end of the desired motion in a way that guarantees that it gets pressed at the point you want the manipulator to stop. When the code detects the limit switch, it limits the motion of the actuator so that it cannot move any farther in that direction.
Limit switches can be placed such that they detect a game piece pressing against it. The robot can then react to the game piece in some way, such as closing a claw to grab it.
Use the two holes to secure the sensor in place such that it is reliably pressed.
The white wire (signal wire) of a PWM cable connects to one pin on the sensor. The black wire (ground wire) of a PWM cable connects to the other pin on the sensor.
The other end of the PWM cable plugs into the DIO on the roboRIO or MXP specified by the properties