View unanswered posts | View active topics It is currently Wed Sep 19, 2018 6:42 am






Reply to topic  [ 4 posts ] 
Programming turns with the gyro 
Author Message
Rookie

Joined: Sat Jan 16, 2016 10:21 pm
Posts: 2
Post 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?


Sat Jan 16, 2016 10:34 pm
Profile
Moderator
Moderator

Joined: Tue May 19, 2015 3:07 pm
Posts: 91
Post 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.


Mon Jan 18, 2016 5:39 pm
Profile
Rookie

Joined: Sat Jan 16, 2016 10:21 pm
Posts: 2
Post 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.


Tue Jan 19, 2016 9:18 pm
Profile
Moderator
Moderator

Joined: Tue May 19, 2015 3:07 pm
Posts: 91
Post 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.


Thu Jan 21, 2016 10:00 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.