In manual mode, the beer pong robot's pan motors (lower) move left to right (-90° to +90°), and the tilt motor (upper) moves from center to up (0° to +90°) via joystick. In autonomous mode, computer vision and ultrasonic sensors detect targets, calculate trajectory, and adjust motor angle and speed to make the shot.
I connected the Raspberry Pi Pico to a potentiometer and a stepper motor, allowing the potentiometer to control the stepper motor's direction and the number of steps it takes. This simulates how a joystick adjusts the pan motors' angles in manual mode. I converted the potentiometer's analog reading into stepper motor steps using a formula that calculates the difference between current and previous analog readings, divided by 150. However, this conversion isn't entirely accurate, causing a slight delay. To improve precision, I plan to derive a more accurate formula for the conversion rate.