Access Encoders in Falcon 500

Hello, I am the lead mentor from team 1662. I am having a problem programming the built in encoders in the falcon 500’s. How would I go about accessing the encoders in the falcon 500’s?

Thank you!
Nicole Stoddart

This thread seems to cover most of the problems people have had:

If you need more help, you can post the code you’re using.

Nicole,

If you use a TalonFX, you can get the position and velocity by using the getSelectedSensorVelocity or getSelectedSensorPosition

import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
private final WPI_TalonFX  sMotorLeftA = new WPI_TalonFX(kLeftMotor1Port);
sMotorLeftA.getSelectedSensorVelocity();
sMotorLeftA.getSelectedSensorPosition();

-Jim

1 Like

When you are setting up the Falcon, set the FeedbackDevice to FeedbackDevice.IntegratedSensor. After that you should be able to get/set values with the SelectedSensor methods.

1 Like