Code Update 3
Tags: journal and thinkPersonhours: 12
After our first league meet, we identified the shooting system as a major bottleneck. Watching match footage revealed how much time we lost with the manual, single-ball operation. Our drivers were constantly managing button presses while trying to navigate and position the robot, creating unnecessary pressure during critical scoring moments. We decided to overhaul the system to make it faster and more autonomous.
The new sequence activates the flywheel and uses the distance sensor to detect when a ball is ready. The servo lifts each ball into the launch position automatically, cycling through all available balls until the magazine is empty. Now, a single button press fires everything we have loaded.
After LM2, we removed the maximum velocity limiter, keeping only the minimum threshold. This allows the flywheel to maintain optimal speed throughout the sequence, dramatically reducing cycle time between shots. The code improvements alone made our shooting significantly faster.
We integrated a PID controller for precision turning using IMU data. The system can also lock onto April tags using Limelight tx values to auto-center the robot toward the goal. For autonomous routines, we calculate shooting distance using the Limelight's ty value combined with known heights and angles.
Our three-ball auto routine uses the distance sensor for backward travel measurement, executes the automatic shooting sequence for preloaded balls, performs a 45-degree IMU turn, and drives forward to the designated leave point.
