Use the V5 Clawbot as a complete programming training robot — drive PID, autonomous routines, arm position control, and the built-in PID tuner — all on one safe, rebuild-friendly platform.
move_absolute()EZ Template uses the IMU (Inertial Measurement Unit) for heading-based turning. Instead of guessing how far each motor needs to spin to turn 90°, it reads the actual rotation of the robot and stops when it reaches exactly 90°. Without it, turns drift significantly — especially on foam tiles.
When the robot turns on, the IMU needs about 3 seconds to calibrate. During this time the robot must be completely still. EZ Template handles this automatically in initialize() when you call chassis.imu_calibrate().
After mounting, turn on the Brain and go to Devices → Inertial Sensor. You should see heading, pitch, roll, and yaw values. Rotate the robot by hand — the heading value should change. If it reads 0 and doesn't move, check the smart cable connection.
| Port | Device | Notes | Reversed? |
|---|---|---|---|
| 1 | Left Drive Motor | Green cartridge (200 RPM) | Yes — use -1 |
| 10 | Right Drive Motor | Green cartridge (200 RPM) | No — use 10 |
| 8 | Arm Motor | Red cartridge (100 RPM) | Check physically |
| 3 | Claw Motor | Red cartridge (100 RPM) | Check physically |
| 11 | IMU (Inertial Sensor) | Added — any free port | N/A |
ARM_MID and ARM_HIGH by running the arm manually, checking arm.get_position() with printf, and noting where it is at each useful height.Write an autonomous that drives forward 12 inches, turns right 90°, drives forward another 12 inches, then returns to the starting position.
Goal: Understand pid_drive_set(), pid_turn_set(), and pid_wait(). After running it, measure how close it got to the starting point. If it's off by more than 2 inches, the PID needs tuning.
Drive a 24" × 24" square — four sides, four 90° turns. Mark the starting position with tape and see if the robot returns exactly to it after the full square.
Goal: Expose PID tuning needs. A well-tuned robot will return within 1–2 inches. A poorly-tuned one will spiral outward. Record the final position error in your engineering notebook.
Enable the PID tuner (press X), run the default drive auton (press B), and use the controller to adjust kP, kI, and kD live. Try to reduce the robot's overshoot to zero. When happy, write down the constants you found.
Goal: Understand what each PID term does by experiencing its effect directly on the robot. See the PID Diagnostics guide for what each symptom means.
Use printf to print arm.get_position() in real time. Manually drive the arm to three useful heights (down, mid, high). Record the encoder values at each position and update ARM_DOWN, ARM_MID, and ARM_HIGH constants.
Goal: Practice sensor-based constant calibration — the same workflow used for every mechanism on a competition robot.
Set up a simple object on the floor in front of the Clawbot. Write an autonomous that: drives to the object, closes the claw to grab it, raises the arm, turns 90°, drives to a "goal" zone, lowers the arm, opens the claw to release.
Goal: Combine all three subsystems (drive, arm, claw) in one routine. Time it and try to complete the mission in under 10 seconds through tuning and optimization.