P straight and Gyroturn errors


Had really great success with this code on gen 1 brain but I changed to gen 2 it has been acting up. Every time I run a pStraight the robot turns instead.

What debugging have you done so far?

I tried putting a wait block in between two blocks and still won’t do anything. Right now I am trying to get the robot to display the degrees.

Update: The brain is saying that the gyro is zero and when it turns it says 90 degrees, something is wrong with the code,but can’t seem to see whats wrong.

This problem has happened to me before, I think i swapped the left and right motors(make left be velocity+output)

That still did not solve the issue. It is still turning and going straight.

Try making error be inertial rotation minus heading

Ignoring all the other code first, if you just set both motors to spin forwards, no other code, does the robot drive actually forwards?

Yes if I do not calibrate the gyro that is inside the brain it works.

The calibration of the IMU would have zero effect on just testing if both motors spin forward when you tell them to do so, outside of all the other code you have.

Your problem could have something to do with the fact that 1st Generation gyros were the last man standing in the VEX range for right-hand rule:

All the newer products (123/GO/2nd Gen/EXP, VR and probably the V5 IMU too) are +ve clockwise.

This may not be the only issue you are encountering, but may be part of it.