When I try to get my BaseBot to move left, it just keeps spinning infinitely. When connected to the controller, I can control and move my bot, but as soon as I tell it to turn left it does not stop.
I re-calibrated the controller, however the heading is stuck at 0 (on the inertial sensor devices screen) no matter which way i rotate it.
float myVariable;
int whenStarted1() {
BrainInertial.calibrate();
while (BrainInertial.isCalibrating()) { task::sleep(50); }
Drivetrain.driveFor(forward, 300.0, mm);
wait(0.5, seconds);
Drivetrain.turnFor(left, 90.0, degrees);
wait(0.5, seconds);
Drivetrain.driveFor(forward, 300.0, mm);
return 0;
}
int main() {
// Calibrate the Drivetrain Gyro
calibrateDrivetrain();
whenStarted1();
}
**when I re-calibrate the 2nd gen brain, not the controller
One thing to be aware of, by default “left” is opposite for Gen 2 compared to Gen 1.
There is a way to override it to report i the same way as Gen 1, I will have to dig it out of my code later.
Not sure why it would show stuck at zero on the devices page; does it happen without any program running, and after pulling the battery for a minute and then reinserting?
Interesting that it’s opposite.
Yes, it stays at 0 even after re-inserting the battery with no code running. Rotating the brain at all on a flat service has no effect. Strangely, holding the brain vertically and tilting it (ex: 45 degrees clockwise) causes the heading to increase continually while it is not moving (ex: it will climb from 0-> 180 without any movement).
I would look up how to do a “deep calibration”. Pretty sure there was a topic here in the forums at one point, or there’s a KB article on it. If I weren’t in the middle of making dinner I’d look for it. 
Thank you, have a good dinner!
I followed the deep calibration instructions from the VEX website (using the link below), but am still getting the 0 heading issue.
Sounds like it’s time to email support. 
Roger that. Thanks for your time!
1 Like