Hello, my team this year is wanting our shooter run off a PID loop, but even through extensive research, I am having some trouble implementing it. I understand the concept (I’m I’m calculus, so I get why the terms are what they are), but I just dont know where to start.
We are using a tachometer for our RPM, and it is a bit inconsistent, so I made a method that averages the RPM for use in the pid loop, but I dont know where to go from there.
I was thinking of adding some PID calculations through a while loop to my shooterSpeed method, but I was told that while loops are bad in robotics.
I understand that there is a PIDcontroller class that helps with this kind of stuff, but the examples and wpi docs confused me with their explanation.
Sorry if I sounded really vague, but can anyone point me in the right direction?
Thank you!
By the way, I’m using the Java Command Robot template.