![]() |
how can you use a gyro in autonomous mode
Hi! i just have a question since i am very new programmer. Okay i know how to create an autonomous mode but how can you use gyro's in autonomous mode. please show me a code so i can have a look at it and learn. thanks by the way my e-mail address is jigarjuhi@yahoo.ca. thanks guys for your time and co-operation. :)
|
Re: how can you use a gyro in autonomous mode
I shouldn't even be writing this, but i felt like i needed to. The second topic in this forum asks the exact same thing (found here:http://www.chiefdelphi.com/forums/sh...ad.php?t=23268) and i gave them the following response:
Quote:
As i just realized though, that doesn't give autonomous code. All a gyro can really do is tell you which way you're pointing, nothing more. So there really is no way to give sample code except for the following which just integrates the gyro output to give you one number which shows how far you've turned. Code:
int theta=0; //in global variables |
Re: how can you use a gyro in autonomous mode
Quote:
Mike |
Re: how can you use a gyro in autonomous mode
I know what the best bennifit of a gyro is (in my mind)... I consider it a backup device... using it with your counter you can make a very sound auton. program. I am searching through my programs last year to find an example of what I am talking about but my programs are on my old computer so when I backed them up on CD's they got thrown all over the place.
Basically it would work like this.... you could use a go-sub like this Code:
Code:
Right_Gyro:REMEMBER This is pbasic coding you will need to convert it into C for this years controller... on Innovation they have the "pamphlet" they created to show you how to do many of these functions... I will work on making some C programming for a gyro but I have many other things to work on for my team so I do not know how productive I will be... If you need help with the coding give me something to work with... a general idea is hard to show you what you want but if you give me a very spacific idea I would be more than happy to help you out ne way I can. If you need the help contact me... AOL IM- GregTheGreat04 (no spaces) E-mail- g.ullstam@comcast.net Good Luck, -Greg The Great |
| All times are GMT -5. The time now is 14:38. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi