Quote:
|
Originally Posted by Squall
Has anyone been able to substitute the gyro ?
I've been looking for info on how to do that, Kevin told me that I should change that two variables that I previously posted, but I can't understand them, and I can't find that info on my Gyro Datasheet
Does anyone have an Ideia ?
|
Sorry, I haven't been around much. The hillside directly behind my house collapsed last Sunday and I've been dealing with the mess.
Anyway, the two variables are GYRO_RATE_SCALE_FACTOR and GYRO_ANGLE_SCALE_FACTOR. GYRO_RATE_SCALE_FACTOR should be set to a value equal to the gyros sensitivity in units of angular rate per volt divided by the ADCs bits per volt. Set GYRO_ANGLE_SCALE_FACTOR to GYRO_RATE_SCALE_FACTOR divided by the update rate, which is 50Hz.
So, for example, to use the Analog Devices' ADXRS150 evaluation board, which has a sensitivity of 12.5mV/degree/sec, take the inverse of that sensitivity (80 degrees/sec/volt) and divide by the number of ADC bits per volt (1024/5), which equals (80 x 5)/1024 = 400/1024 = 100/256. The GYRO_ANGLE_SCALE_FACTOR is then just (100/256)/50 = 2/256 = 1/128.
In the coming days I'll be working on cleaning up not only my house, but the code too <grin>.
-Kevin