Creating a PIDsubsystem for the Flywheel

I am trying to create a PID subsystem for our hooded flywheel, and I am confused about how to implement the code, in command based programming using 2 SparkMax controllers in a command based robot system in java using VS code.

The first thing is to decide whether you want to run the PID controller on the SparkMax or on the RoboRIO. If you want to run it on the RoboRIO, you can do that with a PIDSubsystem. If you want to run it on the SparkMax, then you’d want to use the SparkMax PID methods in a regular Subsystem.

I typed up the code for running the PID controller on the SparkMax, do you need to set the P, I, D and F values for that or do the Talons do that automatically? Whats the difference between running the PID Controller on the roboRio v.s the SparkMax? Is one more beneficial than the other?

Actually I found the difference, with the SparkMax to tune the PID values you have to plug into the Spark which is kind of annoying, how would I run the PID controller on the SparkMax?

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