Hello, I am using CANCoder for the first time. I want to move the Falcon 500 engine angularly with CANCoder. For example, I want the mechanism to go to 50 degrees and 0 degrees with the button. How can I achieve this? Is there sample code?
1 Like
Using the Feedback configs you can set the falcon to use a CANcoder as the sensor, after that just set up and use PID like normal.
1 Like
I have my code in my Github repository, can you check it out?
1 Like
You’re using Phoenix 5 (the old version of the CTRE library), the advice I gave was for Phoenix 6 (the new version this year). 5 will work fine with falcons this year, but next year it and cancoder will only be usable via 6. I haven’t used 5 in a few years so you’ll have to check the WPI-Talonfx’s javadocs for the right configs method to set the feedback sensor.