My team is trying to find a way so our arm(for intake) that goes up and down can be more reliable. We wish for it to be a up button and down button to the same position every time.
.setPosition() just sets where the encoder says it is with .getPosition(). Since the encoder is relative, it just gives you the change in position from where it started. .setPosition() is commonly used for “homing” sequences where you take the mechanism to a known position, usually using a limit switch, and then use that to set the position so later positions are consistant.