View Single Post
  #2   Spotlight this post!  
Unread 27-01-2008, 22:24
mluckham's Avatar
mluckham mluckham is offline
Registered User
FRC #0758 (Sky Robotics)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Ontario, Canada
Posts: 116
mluckham will become famous soon enoughmluckham will become famous soon enough
Re: Gyros and WPILib

I guess this is your own circuit, not the gyro in the KOP? Could you publish the circuit so people can comment?

If an AI value is 'continously incrementing' then usually there is nothing connected to the pins. Although from your description, you are actually seeing a fairly fixed value fluctuating in a narrow range. When you connect, and remove, your gyro from the RC is it obvious from the printf output?

If the incrementing is very small, regular, and slow - you say every second or so - you may be seeing gyro drift which you can't do much about ... the usual approach is to reset the gyro to zero when the robot is in a known position. Most advice in these forums states you can pretty well ignore gyro drift for our 2-3 minute matches.

When you specify the type constant in SetGyroType() the second paramater is actually a numeric divisor which scales the gyro value to tenths of a degree. You could experiment with different values for this.

Last edited by mluckham : 27-01-2008 at 22:28.