Programming


Controller code

Autonomous


The method above moves the robot to the left by a specified distance using encoders for precise positioning. It calculates the target encoder position based on the input distance, resets the motor encoders, sets target positions, and then runs the motors until they reach the desired position. The while loop continuously checks motor activity, maintaining movement until the desired position is reached.