Hello.
Currently, we have a flywheel that shoots at rpm of ~1200 for bar shots.
I have a program that puts the rpm onto the lcd, but the lcd display is only flickering between values 1200 and 1500.
It does not give us anything more accurate than this.
Does anybody know how to make the rpm more accurate?
Sounds like your flywheel oscillates a lot. You can try making a running average to filter out values that are higher or lower than expected with an array.
The rpm of your flywheel is constantly changing, which your encoder reads. It’s not a matter of accuracy; the values you are reading off the LCD are perfectly fine. If you want the value not to change as much, tune your velocity control until it doesn’t oscillate.
Oh, OK. Try blowing the encoder with compressed air. I’ve found that over time the encoder gets dust inside the disc and starts to jump around a lot. Smoothing the velocities like I mentioned earlier will also help get more consistent values.
I got the flywheel rpm to work, but i dont understand why my bang bang code is not working.
Ive attached it below in both c and block programming.
The variable shootSpeed is the variable for my toggle.