Advanced programming techniques, platform evolution, and strategy integration
SPIKE Prime
Block Programming
Pybricks
MicroPython
95%
Consistency
±2°
Turn Accuracy
We tested various Kp and Kd values to optimize drive performance. Our best results came from Kp=1.15 and Kd=0.02.
Code supports mission grouping and quick attachment swaps — teams can switch runs with minimal reconfiguration and rely on consistent sensor feedback.
def drive_straight(distance_mm, speed, kp=1.15, kd=0.02):
robot.reset_gyro()
robot.reset_encoders()
while robot.get_distance() < distance_mm:
error = robot.get_heading()
correction = (kp * error) + (kd * (error - prev_error))
left_power = speed - correction
right_power = speed + correction
robot.set_motors(left_power, right_power)
prev_error = error
robot.stop()
def turn(degrees, speed, kp=1.0):
robot.reset_gyro()
while abs(robot.get_heading()) < abs(degrees):
error = degrees - robot.get_heading()
power = kp * error
robot.set_motors(power, -power)
robot.stop()
Our drive-straight code uses PID-style corrections with optimized values: Kp=1.15 and Kd=0.02. These values emerged from systematic testing across different speeds and distances, resulting in repeatable and reliable performance, even under varying loads and battery levels.
GitHub allows our team to collaborate on code safely. Each team member can work on different runs or features without overwriting others' work.
We use branches for experimental changes and commits to track our progress. This means if something breaks, we can roll back to a working version.
We organize runs, attachments, and PID tuning experiments with clear commit history and pull requests.