Hello FRC programmers!
I am a programmer on team 4829. We recently tested our shooter code on our shooter mechanism, which has two motors. We wanted to use a follower object so that both motors would be moving together. However, when testing the code, the follower motor did not receive any voltage (marked by yellow LED on motor) while the leader motor did. This happened when were set both motors to a low voltage ~ 0.4 volts. I have our code posted below. Could anyone help resolve this issue?
Any help is greatly appreciated!
public ShooterSubsystem() {
leaderFlywheel = new TalonFX(ShooterConstants.LEADER_FLYWHEEL_ID);
followerFlywheel = new TalonFX(ShooterConstants.FOLLOWER_FLYWHEEL_ID);
follower = new Follower(leaderFlywheel.getDeviceID(), true);
TalonFXConfiguration shooterConfig = new TalonFXConfiguration();
shooterConfig.Slot0.kP = ShooterConstants.SHOOT_P;
shooterConfig.Slot0.kI = ShooterConstants.SHOOT_I;
shooterConfig.Slot0.kD = ShooterConstants.SHOOT_D;
shooterConfig.Slot0.kS = ShooterConstants.SHOOT_S;
shooterConfig.Slot0.kV = ShooterConstants.SHOOT_V;
shooterConfig.Slot0.kA = ShooterConstants.SHOOT_A;
shooterConfig.MotorOutput.NeutralMode = NeutralModeValue.Coast;
shooterConfig.MotorOutput.Inverted = InvertedValue.CounterClockwise_Positive;
shooterConfig.MotorOutput.DutyCycleNeutralDeadband = HardwareConstants.MIN_FALCON_DEADBAND;
leaderFlywheel.getConfigurator().apply(shooterConfig, HardwareConstants.TIMEOUT_S);
public void setRPM(double leaderRPM) {
VelocityVoltage leaderSpeed = new VelocityVoltage(leaderRPM / 60.0);
leaderFlywheel.setControl(leaderSpeed);
followerFlywheel.setControl(follower);