I’m really going crazy trying to integrate the 2008 gyro into my easyCPlus code. The code includes gyro types for three older types of gyros but no information about what to use with the AD22304 supplied in this year’s KOP. Can anyone please help me out here?
Also, does this new gyro read out in decidegrees or some other unit after initializing and starting with the easyCPlus code?
Just insert the gyro type code for the ADXRS80. Or 125…either way it will work for you.
For your second question, electronic gyros just output a voltage that is proportional to the RATE the chip is turning. Software can use this information to get degrees/second which can be integrated to give you relative heading. Relative meaning it can tell you what direction you are pointing relative to when your gyro code was intialized. The WPILIB that easyC uses takes care of this for you with the easy to use functions.
thanx for the quick reply. I did as you suggested and then ran the gyro test program. It initialized nicely to a 000 decidegree output. I then turned the control board that the gyro is mounted on 90 deg and got fairly nice follow. I returned the board to zero degrees and it returned to 10 or 20 decidegrees. I turned the board to 180 decidegrees and it followed but when I returned to zero degrees it started reading erratically. It did eventually settle out but settled out to about 2000 decidegrees.
I seem to be getting erratic readings and drift. Do you have any suggestions?
I have to be honest with you, I’m not too sure the kit gyro is suitable for our purposes. It is only accurate up to ± 80 degrees/sec. Turn your hand 90 degrees…but slow enough that it takes 1 second and you will see what I’m talking about. So for your tests, try this:
Turn it very slowly. Try to turn it around the chip axis.
Give the gyro 5 minutes to warm up then reset the RC and run your tests. Durning competition we power up before we go on the field to let our sensors warm up.
In practice you can use this gyro to help you drive straight. It’s hard to turn your robot slower than 80 degrees/sec.