ROBOTC.net forums
http://www.robotc.net/forums/

Programming turns with the gyro
http://www.robotc.net/forums/viewtopic.php?f=69&t=13143
Page 1 of 1

Author:  RickyT [ Sat Jan 16, 2016 10:34 pm ]
Post subject:  Programming turns with the gyro

With a gyro installed can we use the simple TurnLeft xxx degrees command or do we have to use the whole getGyroDegrees/SetMotor/SetMotor set of commands?

Author:  Tabor473 [ Mon Jan 18, 2016 5:39 pm ]
Post subject:  Re: Programming turns with the gyro

You are going to have to program it yourself using something like getGyroDegrees. The turnLeft function uses encoders in the motors.

Author:  RickyT [ Tue Jan 19, 2016 9:18 pm ]
Post subject:  Re: Programming turns with the gyro

OK. So we rewrote the program with getGyroDegree and setMotor lines, but noticed another problem. The gyro doesn't measure degrees accurately. In fact, if I check the Device Info for the gyro, the degrees will increase by one degree every 6 seconds (or so) even though the robot is stationary the whole time. This can't be considered "drift" if it's not even moving, can it? I'm thinking that my gyro is defective.

Author:  Tabor473 [ Thu Jan 21, 2016 10:00 am ]
Post subject:  Re: Programming turns with the gyro

So ya what you are experiencing is drift. Usually for simple applications like this the best solution is to reset the gyro value before each turn. If this is impractical for your implementation you could try using the built in encoders for tracking rotation instead.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/