Thread: Gyro Rate
View Single Post
  #2   Spotlight this post!  
Unread 25-02-2008, 12:40
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Gyro Rate

You are correct, just poll the analog value. Keep in mind that the value you receive isn't truly analog, but the result of the analog to digital conversion. It returns a 10 bit value. To use it you need to find the resting value after the gyro is turned on (wait a second). That is the gyro's center. You also need to figure out the degrees/sec/bit for your gyro. As the value varies from resting value you can convert it to turn rate. So if you look at the spec sheet for your gyro, it will have a spec for mV/degree/sec. Take that along with the max turn rate (80, 150, 300, etc.) and the fact that the 10 bit value is proportional to 5v and you can figure out the turn rate. I'll let you figure out the math..

good luck!