How to set up CAN ID's and use DifferentialDrive with VictorSPX's via CAN in Java

Rookie team here, Im trying to use four Victor SPX’s for our drivetrain via CAN.
I know that there is a documentation from CRTE but Im still stuck and I cant find anything online.

How would be go about setting the motor controllers from scratch? I have the pheonix libraries installed and everything.
Whats the best way to set the CAN ID’s and do I use those ID’s when creating a new VictorSPX object?
Is there any way to use the DIfferentialDrive from the WPILIB libraries?


EDIT: so coincidentally, I found some examples I was looking for, they can be found here :

Now Im just looking for some advice on how to set up the CAN connections and ID’s for each VictorSPX.

1 Like

You can start at their initial documentation. Read through the whole thing to be sure, but overall, you are looking at the Bring Up sections for each thing:

Alright, so I should use the tuner to change the ID’s to something other than 0.
When creating the VictorSPX object, the intended parameter is the ID of the controller correct?

Just want to be sure, gotta get the chassis working tomorrow.

Each Victor upon opening them out of the package will have a default port of 0. Each Victor you use on your robot should have a unique CAN Id. So you can keep one Victor with an Id of zero, but you must change the rest in Phoenix tuner.

Yes. All you need to do is input the CAN Id number for the parameters

Thanks! Good luck