| ID | Device |
|---|---|
| 1 | Swerve FL Drive |
| 2 | Swerve FL Rotation |
| 3 | Swerve FR Drive |
| 4 | Swerve FR Rotation |
| 5 | Swerve BL Drive |
| 6 | Swerve BL Rotation |
| 7 | Swerve BR Drive |
| 8 | Swerve BR Rotation |
| 9 | Swerve FL Encoder |
| 10 | Swerve FR Encoder |
| 11 | Swerve BL Encoder |
| 12 | Swerve BR Encoder |
| 15 | Pivot motor |
| 16 | Pivot encoder |
| 17 | Wrist motor |
| 18 | Telescope motor |
| 20 | Claw motor |
| 30 | Claw CANRange |
| 40 | PCM |
| 0 | Claw solenoid |
| 24 | Pigeon |
- Physcially rotate the swerve modules to their zeroing position.
- In Phoenix Tuner, click the zero button for each encoder and note the value that appears on screen.

- Convert the Phoenix Tuner encoder offset value from turns to degrees and add any necessary offsets, such as removing the 45 deg offset.
- Record these values in
CowRobot.cppfor each module.1538_2025/src/main/cpp/CowRobot.cpp
Lines 12 to 15 in 321df05
- Load the new build onto the robot.
- Validation
- Enable the robot in teleoperated mode. The modules should all point forward without joystick input.
- Check the translation joystick. Make sure the driver station alliance is set to blue.
The starting pose for the robot is at the blue alliance wall facing toward the red alliance wall, so moving forward on the joystick should move the robot away from the driver.
- If you suspect that the drive motors or rotation motors are inverted, enable it manually in Phoenix Tuner and move each motor with a positive duty cycle control.
- A positive control for the drive motor should spin it CW as seen from the right side of the robot.
- A positive control for the rotation motor should spin it CCW as seen from the top of the robot.
- If it's inverted then change the motor polarity in
SwerveModule.cpp. The codebase hasn't been tested on Swerve X2i, so depending on if it has an odd or even number of gears, the motor polarity may have to be inverted. - Drive motor
- Rotation Motor