VEX Code IQ

How do you Trim the power on your motors, when the fallowing happens:

Using the "Drive Forward for___ " Block and your robot drifts off course? (AKA does not go in a straight line)

Hi @Daniel_Faddis try using the [set drive velocity] and the [set turn velocity] blocks, both can significantly improve the accuracy of your robot’s autonomous path by fine tuning its rates of travel.

I created a Google doc to help with this, Setting Drive Velocity and Turn Velocity in VEXcode IQ

For more information on this, there is an excellent video, Adjusting Velocity, in the VEX IQ 2nd generation STEM lab - Castle Crasher .

1 Like

Hi @David_Kelly
I watched the videos again and I have a full understanding. But, the same issue that I am asking about is in the videos. If you watch them closely you will see the right motor start just before the left and the left will finish just after the right. The Normal fix for this issue is to run your right motor slightly slower than your left. It will give the effect of running in a straight line and will give your robot its full rang of speed under control. I know how to write the code, but that means not using the drivetrain blocks. Is this possible with the Drivetrain Blocks?

Hi @Daniel_Faddis, I was talking with @Tim_Friez when I was writing up my Google doc. He told me both the rpm and percent power are under PID control for the [set velocity] blocks. This means the motors should self-adjust their speed. I prefer to set the rpm, but in theory with PID control it should not make a difference. There is not a [set] block to manually adjust individual motors within the drivetrain blocks.

1 Like

@David_Kelly
Thank you for checking.