Talon srx not enabling

When i enable the control mode in the turner for testing it works the light truns green and red if going forward or backward, but when i test it with the driver station it doesn’t enable properly.

Just in case here is my code:package frc.robot;
import com.ctre.phoenix.motorcontrol.ControlMode;
import com.ctre.phoenix.motorcontrol.NeutralMode;
import com.ctre.phoenix.motorcontrol.can.TalonSRX;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Servo;
import edu.wpi.first.wpilibj.TimedRobot;


  • The VM is configured to automatically run this class, and to call the functions corresponding to
  • each mode, as described in the TimedRobot documentation. If you change the name of this class or
  • the package after creating this project, you must also update the build.gradle file in the
  • project.
    public class Robot extends TimedRobot {
    • This function is run when the robot is first started up and should be used for any
    • initialization code.
      WPI_TalonFX motorRight1 = new WPI_TalonFX(0);
      WPI_TalonFX motorRight2 = new WPI_TalonFX(1);
      WPI_TalonFX motorRight3 = new WPI_TalonFX(2);
      MotorControllerGroup groupRight = new MotorControllerGroup(motorRight1, motorRight2, motorRight3);

WPI_TalonFX motorLeft1 = new WPI_TalonFX(4);
WPI_TalonFX motorLeft2 = new WPI_TalonFX(3);
WPI_TalonFX motorLeft3 = new WPI_TalonFX(5);
MotorControllerGroup groupLeft = new MotorControllerGroup(motorLeft1, motorLeft2, motorLeft3);

// Store the original servo position in a variable
double originalPosition;

TalonSRX window;
Servo Servo;

Joystick gamePad;

public void robotInit()
window = new TalonSRX(10);
Servo = new Servo(7);
gamePad = new Joystick(0);

originalPosition = Servo.getAngle();

//Inverted setting



public void robotPeriodic() {}

public void autonomousInit() {}

public void autonomousPeriodic() {}

public void teleopInit() {}

public void teleopPeriodic() {

window.set(ControlMode.PercentOutput, 1.0);
else if (gamePad.getRawButton(6)){
window.set(ControlMode.PercentOutput, -1.0);
else {
window.set(ControlMode.PercentOutput, 0);

if (gamePad.getRawButton(1)) {
// Rotate servo to angle
} else {
// Set servo angle to the original position
// Spin control - using two joysticks
double leftStickY = -gamePad.getRawAxis(4);
double rightStickY = -gamePad.getRawAxis(4);

// check if left joystick is held down and right joystick is up
if (leftStickY < -0.5 && rightStickY > 0.5) {
// check if left joystick is up and right joystick is down
else if (leftStickY > 0.5 && rightStickY < -0.5) {
} else {
// Drive control - Arcade Drive
double moveSpeed = -leftStickY; // inverted for proper control direction
double turnSpeed = gamePad.getRawAxis(4);

// adjust move speed for better control at lower speeds
moveSpeed = Math.copySign(Math.pow(moveSpeed, 2.0), moveSpeed);

// combine move and turn speeds
double leftSpeed = moveSpeed + turnSpeed;
double rightSpeed = moveSpeed - turnSpeed;

// limit motor speed to maximum allowed value
double maxSpeed = 0.8;
leftSpeed = Math.copySign(Math.min(Math.abs(leftSpeed), maxSpeed), leftSpeed);
rightSpeed = Math.copySign(Math.min(Math.abs(rightSpeed), maxSpeed), rightSpeed);

// set motor speeds


public void disabledInit()
// Set servo angle to the original position

public void disabledPeriodic() {}

public void simulationInit() {}

public void simulationPeriodic() {}

I’m not sure if this is your only problem, but you seem to be using this same axis in three places.

What do the LEDs on the Talon SRX do when it doesn’t enable properly? That will go a long way towards identifying the problem.

They blink orange.

1 Like

Have you verified your joystick works? Also, like @bovlb said, you call axis 4 several times.

Since they blink orange, that means it isn’t receiving the signal to enable. Since you say you can communicate in tuner it’s probably not a wiring issue. Check the ID in the code matches what’s in Tuner.

The joystick may also be a problem, but doesn’t explain the flashing orange.

1 Like

Also I’m curious which firmware is installed on the devices. If it’s a mismatch of numbers or even Pro vs V5 phoenix. That messed up someone else earlier this year with Falcons I believe. Same orange lights

The TalonSRX doesn’t have v6 firmware nor is it supported in the v6 API.