Limit Switches - quasics/quasics-frc-sw-2015 GitHub Wiki

Limit Switches are sensors that tell you when something is touching it or not. They can be used to prevent mechanisms from moving too far in one direction or another, or if your robot has hit something (if the switch is mounted on the outside of your robot).

Any sort of a switch that can reset itself when the pressure comes off can be used as a limit switch. One common style looks like this:

Simple mechanical limit switch

Wiring

Limit switches are connected to the digital in/out (DIO) ports on a RoboRio.

When wiring a limit switch to a RoboRio, you can use a normal PWM cable. The wire may be soldered directly to the limit switch, or you may use connectors like these to make a quick-connect wire.

Connect the black/brown wire to the "ground" port on the switch, and then the white/yellow wire to the "NO" (normally open, or not signaled) or "NC" (normally closed, or signaled) port on the switch.

Resources