I would like to program a pid for my robot. plz help

Hello! My name is Anthony and i am not new to using Vex V5 pro. i would like to say i am pretty good at understanding code and i know how to program advanced code. i would like to learn how to program a PID for my robot. i have used example codes before on my robot and have adjusted them for my robot in multiple different ways. i have asked ppl i know that use it for their robot (they use different kind of drivebase) and they say to do what i have already tried. is there anybody that could help me and give me an example of a code that could work on a 4 motor (200 rpm) Mechanum Wheel drive base. the motors are directly connected (not geared up or down in any way) i only want a PID for turning left and right and moving forwards and backwards but if somebody could help with a strafing code as well that would be amazing. thank you!

Hey since you said you could program advanced programs, heres a really good documentation on how PID works and how to use it.
http://georgegillard.com/documents/2-introduction-to-pid-controllers
I learned from this for how to use pid, and it really helped me out a lot.

3 Likes

i will try this the next time i have access to my robot, thanks!

You don’t need access to your robot, but it is recommended. I coded my PID friday night after school so i wouldn’t be able to access the robot, and ill be testing it Tomorrow, since today is sunday for me. I would still recommend reading it. Since it has some pseudocode in there so you can understand it better.

1 Like

awesome! let me know if it works and i will for sure try it too my self!

You don’t need to have a robot to code your PID, but you do need it to tune the PID.

did your pid that you programmed work?

I have yet to test it.