TalonSRX doesn't work when robot is enabled

The TalonSRX doesn’t work despite the signal light blinking, signifying the robot is on. TalonSRX indicated robot was not enabled. The build was successful and there were no errors, however the robot did not respond to inputs on the controller. We believe this might be because TalonSRX is deprecated for phoenix v6, causing us to use v5, but we are not sure.

Link to code (the error involves the drive subsystem):

There are multiple robots in that Git repo. Can you link to which one specifically isn’t working?

Are these the ones youre referring to? KitBot/KitBot/src/main/java/frc/robot/subsystems/DriveSubsystem.java at main · RegalEagles2869/KitBot · GitHub

If so, youre using the wrong class. Talon != TalonSRX.

How are your TalonSRX controllers connected to the Rio? CAN or PWM?

We are using CAN. We are unable to use the addFollower() method when we switch the class to TalonSRX however.

And my first question? Your github repo has a project within a project, so we dont know specifically what you’re using.

Assuming im right, that’s 100% your issue. The Talon class is from WPILib and is for PWM control. The Talon controller also doesnt support CAN.

The TalonSRX, however, does, but CAN control requires the phoenix library and use of a different class in your code. Going from memory here, but I believe it’s simply named TalonSRX or CANTalonSRX. If you need wpilib functionality (i.e. to use it with the DifferentialDrive class), then you need to use the version with the WPI_ prefix

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