Creating an Encoder Object from an Encoder Connected Directly to a TalonSRX Universal Breakout Board

Our team is using two AMT-103-V encoders from FIRST Choice on our drivetrain and they’ve each been hooked up to a Talon SRX Universal Breakout Board connected to Talon SRX’s (one on each side of the drivetrain). As my rather verbose title points out, I was wondering if there was a way to identify these as Encoder Objects visible in the robot code. We would only be using this functionality for outputting data to the Dashboard during testing as we are aware that using the Talon’s internal abilities for the PID loop is superior.

Thank you for your help with this matter!

No, they cannot be used as Encoder objects; Encoder objects in WPILib are only for encoders plugged into the RoboRIO. But you can put any arbitrary number, including the encoder value you get from the Talon SRX, to the dashboard by using SmartDashboard.putNumber().

1 Like