View Single Post
  #3   Spotlight this post!  
Unread 27-01-2006, 20:41
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Yaw Rate Gyro Problems

sounds like you want to use the gyro as a compass?

a solid state gyro sensor tells you how fast the robot is turning, in one direction or the other. the reading you get when not turning is the 'zero' point.

To figure out compass heading, create a 16 bit variable "heading" and initialize it to 32,000. On each loop of the main SW read the output of the gyro chip, add it to HEADING, and subtract the zero offset (you have been getting 536 for the zero reading)

then if the bot turns one way, this running summation will go up. Turn the other way and it will go down. You will have to do some testing to see what the scaleing is for the sensor you use (what change in reading = 1 degree).