How to use encoder on TalonSRX (Java Programming)

I have a Talon SRX and would like to hook it up to an encoder so that I can keep track of how far up (and down) a motor has moved an elevator lift. Does anyone have any Java examples of a TalonSRX reading in values from an encoder and controlling a motor?

Which encoder are you using?

I would have to point you to our GitHub, specifically to our elevator subsystem which is linked below. Feel free to ask any questions, the line you are specifically talking about is this
we use a CTRE mag encoder but the QuadEncoder would work fine when hooked directly up to the Talon, just use FeedbackDevice.QuadEncoder

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.