View Single Post
  #5   Spotlight this post!  
Unread 02-02-2008, 21:15
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 747
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: How to get robot to drive straigth using shaft encoders

Quote:
Originally Posted by eccmaster View Post
Hello
We did get the 300dps from spark fun to use for 90 degree turns. I did notice that when we use the gyro functions in easyC, instead of getting readings of 1/10th of a degree with the gyro that came in the kit of parts (90 degrees = 900) we got only steps of 1 degree (90 degrees = 90). Why is that so?
Did you change the GYRO type? When you intialize the gyro, you have to set the gyro type to scale it correctly.

Also, if you are using the gyro to drive straight, do not use the gyro easyC function (which returns DEGREES), instead, read the raw analog value from the gyro. This will be the "rate" of turn. If your not turning, the analog will be ZERO. If you start to turn, the gyro will sense the rate of your turn and you can use that as a error to adjust your PWM outputs.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369