Limiting Motors

We have several things that can only move a certain amount in one direction. One that moves based off user input, and other that when the user presses a button will move to a position and move back when the button is released.

I need some help on limiting the movements, on the one with the button press i dont see an easy spot to place a gear tooth sensor (which we only have 2 of). My question is just using the pwms with the same values to move back and forth accurate enough or not. I dont want to break anything on the robot with it being inaccurate.

The others i think a gear tooth sensor would work but i more sure how accurate they are

There are two types of limit switches in the Kit of Parts (two microswitches and a rotary limit switch), try to figure out how to mount one of them so the switch is activated near the end of the desired travel.

Also if you have an arm, put it as close towards the center of rotation (but at the end of rotation) as you can, because if it’s all the way out on the radius it’ll take longer to activate the switch. We fatally bent an arm on accident that way! Had about 2 minutes between semifinal games to replace it. Bad news.