How to create a shooter with PIDSubsystem?

I am trying to write a PIDSubsystem for a balls shooter, that contains a Spark and an encoder (for knowing the wheel’s speed).

I searched about working with the PIDsubsystem, but I didn’t understand it.

If you’re unable to follow the ScreenSteps guide, you should probably step back from robot programming and spend some time working through programming basics. I know this is frustrating advice, but it’s a mistake to try to jump into advanced controls if you don’t have the language fundamentals mastered.

Agreed.

Also, unless the point is to learn the PID subsystem, a bang-bang controller usually works very well for a wheeled shooter. Simple logic - if the wheel is spinning slower than desired, go full throttle. If spinning faster, zero (in coast mode). Also, have a “window” where the speed is acceptable, and the throttle is not changed.