|
Re: understanding position control with encoders
What you need to do is create a command that initializes the talon's srx PID. Since you have it in position mode, the setPoint is going to be the distance you want the arm to go to. You will need to set a constant that relates degrees to ticks. You can use the configEncoderCodesPerRev() to do so (this is assuming the encoders are connected directly to the talon srx). We do something similar. https://github.com/FRC125/NU16/blob/...sitionCmd.java
__________________
Hopper finalist 2015
Dean's List winner 2015
|