Integrated Encoder Motor PID control

How can I do PID control on an integrated encoder motor?
Thanks.

–__–. Your question is VERY vague.

Just use the values from the IME instead of a sensor value. So, you would use


nMotorEncoder];

vs


SensorValue]

If you don’t know how to use an IME, then here’s a link that could help .

If you don’t know how to make a PID controller then I would really recommend this article by George Gillard. It taught me and countless other teams the basics of PID.

If you wanted some code examples then you can just search the forum. No one is really going to write code for you (except maybe Jpearman). It’s not really any different than a regular PID controller. You are just changing one part of the code.

The IME that is in the vex motors currently get very staticy and can often times get weird reading or die. Just be aware that they will break sometimes or be inAcurate if you do decide to use them

I’ll second @Owenasian’s comment on IMEs. Please read:
https://renegaderobotics.org/why-ill-never-use-imes-againwas-imes-part-2/

Sorry you had such a bad experience with IMEs Leslie. I use IMEs on every robot I build for myself, the team I coach also use them frequently. The only time we had any serious problems was during the sack attack season where large polycarbonate intake systems combined with cloth covered game objects and mecanum wheels seemed to create lots of static.

RobotC certainly had some issues before version 3.60, but that was nearly five years ago.

Used appropriately I still think they are a worthwhile sensor.

I have to say, that article is very well written and sums up my frustrations with the IME sensors. Thanks for sharing I’ll be sure to pass it on to some teams I know who’ve had similar difficulties. ;).

True. The issue is I just can’t trust them to work like intended anymore. When I absolutely must use an IME, I make sure that I have an LCD that displays the value at match start so that I know it will work at least for the 15 seconds of auton.