Vex vrc pid

So I am having trouble keeping my flywheel at a consistent speed. If Iput the power at anything below 70 it oscillates. I dont have weights on it because i dont have any of the official pieces from vex and dont really have room for them on the flywheel.
I saw that a lot of people have had this problem. I tried to figure out how to set up a pid but the video i watch doesn’t explain it well enough
Also i saw that many people said to get around it by using voltage for the motors but i dont know how to code that. Can anyone help?

Okay, gonna assume that you’re using CPP and are in vexcode not pros.

Voltage over Percent - Try this first

//Imagine if you wanted 100% power
double wantedPower = 100;

Try this:

dt1.spin(vex::forward, wantedPower, percent);

Over this:

dt1.spin(vex::forward, (wantedPower / 100 )* 12, volt);

Programming a PID
-Go to Connor’s Tutorial, make sure to follow step-by-step.

2 Likes

Thank you i will try this out and look at the tutorial.