Controller drift problems

Hello everyone,

I’ve been having an issue with my VEX IQ RC controller drifting for a while, and I’m not sure how to fix it.

I was wondering if it would be possible to solve this using Python or a PID controller. My idea is to use the gyro sensor to automatically correct the drift so that, when I’m driving straight without turning the controller, the robot keeps moving in a straight line.

Basically, I’m looking for a way to create code that continuously compensates for the drift automatically.

Any help or advice would be greatly appreciated.

So there are three different different modes:

  • Coast mode makes it so that when you let go of the control, it just keeps drifting. That’s the automatic setting and likely your problem.
  • Brake stops it, but it can feel a little jerky. After a few seconds, the bot can be moved.
  • Hold stops your motor and if an external force tries to move it, the motor works to keep it in place.

You can manually code this yourself, with a code like, “when joystick released, apply a slight reversal”, or toggle a block that says motor stopping.