View unanswered posts | View active topics It is currently Tue Sep 30, 2014 3:25 am






Reply to topic  [ 4 posts ] 
HTGyroscope 
Author Message
Rookie

Joined: Thu Dec 29, 2011 7:04 pm
Posts: 6
Post HTGyroscope
Hi all,

Can someone write a basic autonomous code like run forward, turn left 90, run forward, turn right 90? Im not exactly sure how i should integrate the time from the gyro. Thanks in advance!


Wed Feb 08, 2012 1:35 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: HTGyroscope
Here is a thread that may answer your question.
viewtopic.php?f=52&t=3152


Wed Feb 08, 2012 3:21 am
Profile
Rookie

Joined: Thu Dec 29, 2011 7:04 pm
Posts: 6
Post Re: HTGyroscope
My next questions is do i need to integrate the gyroscope each time i use it or just integrate it once in the while loop?


Wed Feb 08, 2012 10:41 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: HTGyroscope
allbeengone wrote:
My next questions is do i need to integrate the gyroscope each time i use it or just integrate it once in the while loop?

I don't understand your question. Are you referring to the gyro module provided in that thread or are you talking about doing your own integration? In any case, integration is done periodically. So the integration must be call once inside the robot main loop. In other words, at the beginning of each loop, the integrator gets called. When you want to read the heading, you just call the gyro module to get the value, you don't need to call the integrator again since it's already done at the beginning of each loop.


Wed Feb 08, 2012 2:55 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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.