How to program can cables in java 2020?

How do you code motor controllers that use CAN cabals in Java?

You should move this to the Java section.
What motor controller type? What do you want to do?

sorry about not being in the java section, first time using this website. The motor controllers are the VictorSPX and TalonSRX, I was just wondering since it’s using CAN cables do i need to code it differently than if it was a PWM cable.

Yes. When you use CAN you have to add the CTRE Phoenix library and use the WPI_TalonSRX and WPI_VictorSPX classes.

Here’s the Phoenix documentation
https://phoenix-documentation.readthedocs.io/en/latest/index.html

You didn’t move this to the Java section. You should do that.

Moved it to the Java section.

1 Like

You don’t have to use the WPI_* variants. TalonSRX and VictorSPX classes will work. I believe there are different classes of you are using PWM control.

This is true, but you do have to use the classes provided by the CTRE Phoenix library for CAN support.

I would use the WPI_ versions unless you have a reason not to. They are compatible with anything that works with a SpeedController, like DifferentialDrive.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.