VEXcode Limit Switch Program

I’m trying to attach a limit switch to my robot so the arm won’t go above its top height and break something. How do I program it? My current program is if(ArmLimit.pressing()) { ArmMotor.stop(vex::brakeType::brake); }

Yes, that looks about right.

This is vex example using bumper button that is functionally similar to limit switch:

1 Like