|
Re: Off Season Experimentation
I see two issues with the code you posted. First, it only runs once. In order for it to do what you want, reading the Gyro angle and setting the motor speeds need to be inside a While loop. Second, you're checking for exactly 90 degrees, and that's a very unlikely number. Try stopping the motors after it has turned at least 90 degrees; that way you won't fail to stop because you miss the brief instant when it's right at 90 degrees.
|