Quote:
|
Originally Posted by BradAMiller
As you said in your other post, you can retrieve the raw yaw rate just polling the gyro analog port directly. It returns 12.5mv/deg/sec of rotation. The analog to digital converter returns a value from 0-1024 for the range of 0-5000mv. So by doing some arithmetic, you can create a function that returns the actual rate of rotation directly.
Can you try putting in a print statement when the timer is started and another when you are reading the timer just to verify that it is being started? Also, are you doing a Preset operation on the timer anywhere in your code that might be getting unintentionally executed repeatedly?
|
So for the gyro yaw rate, we are using a 300 deg/sec gyro, so 5 mv/deg/sec. However, the ADC still returns 0-1024 right? It's just a matter of scaling (which we've implemented for heading conversion).