Setting up Motors
Overview
There are a couple of steps involved with setting up your bot's motors, and this page will cover these steps.
Updating ID and Name
Updating the ID and name of motors contributes functionally to address the motors in code and organizationally to understand the purpose of each motor. You can update the ID number of the motor by typing text in the following box:
You can update the name of the motor by typing text in the following box:
Motor Inversion
Sometimes, you need to switch the motor direction to ensure that the "forward" direction is positive. You can switch this in Phoenix Tuner as such:
Cancoder Settings
Some motors require cancoders, which have IDs of their own. You can update the cancoder ID by navigating to the cancoder itself and changing the ID number here:
Then change the motor configs to ensure it is assigned to the correct cancoder:
Tuning Configs
The tuning configs are located here:
Drivetrain Motors
For the sake of organization and easy access, we ID our drivetrain motors sequentially from 0-11.1-8. This is because Phoenix Tuner displays devices in order of ID, and therefore keeps the drivetrain motors at the top of the page:
Update Configs in Code
Changing the configs in Phoenix Tuner is important to make sure they are correct, but after this, you need to update the configs in the code. For example, if the motor I am trying to update is the Arm motor, navigate to the following config file:
Then find the settings you want to update and change them: