TalonSRX Motor Controller Introduction#
TalonSRX motor controller is designed for brushed motor like CIM or mini-CIM which looks like
Motor Definition#
public TalonSRX motor;
//You can configure more settings by using the TalonSRXConfiguration class
public something(){
motor = new TalonSRX(0);
motor.configAllSettings(new TalonSRXConfiguration());//restore settings
motor.setInverted(InvertType.None); //set inverted, you can check out the InvertType class for more settings
motor.setNeutralMode(NeutralMode.Brake);
}
and you can drive the motor by this command
public void drive(double speed){
motor.set(TalonSRXControlMode.PercentOutput, speed); //you can checkout the TalonSRXControlMode to get the more information for driving motor methods.
}
Note
You can check out this table if you want to know what’s the differences between Brake and Coast.