View Single Post
  #1   Spotlight this post!  
Unread 12-02-2008, 17:21
1594code 1594code is offline
Registered User
FRC #1594
 
Join Date: Feb 2006
Location: New York
Posts: 16
1594code is an unknown quantity at this point
Gyro not working

Our gyro used to work, but now it doesn't. We have tried using old gyros from previous years, but they do not work either. Perhaps it has something to do with our code. We are using WPILib:
InitGyro(1);
StartGyro(1);
Wait(2000);

while(1){
printf("Angle %d\r", GetGyroAngle(1));
}

The output is "0" until the gyro is rotated a large amount (usually near 360 degrees). Then the output is random, ranging from low values into the thousands, with no correlation to the degree of rotation.

Any ideas what our problem might be? Any help would be greatly appreciated!