![]() |
gyro and accelerometer problems
Hey, we're using kevin's new 08 code (along with accelerometer we found on chiefdelphi), and when we disable the robot, it calibrates the gyro and the acceleromter. However, the gyro bias is -1, the rate is -21, and the angle never changes, even when we move the robot. Also, the accelerometer never yields any result but 0. Any ideas?
|
Re: gyro and accelerometer problems
As far as the gyro goes, are you sure that the wires are connected to the pins labeled T, and not the ones labeled R? This has been a really common mistake for years.
|
Re: gyro and accelerometer problems
no, i'm certain that that's not the issue. They use the weirdest naming system...
|
Re: gyro and accelerometer problems
Put in some printf's in the ADC interrupt handler to make sure the analog input is updating.
Also, did you do these? Code:
1) The gyro's rate output is wired to one of the analog inputs |
Re: gyro and accelerometer problems
Quote:
-Kevin |
Re: gyro and accelerometer problems
OK! so! i think i figured out the problem! it was probably the combination of
A: the gyro being plugged into the wrong port (curse you electrical people!), and B: the fact that i hadn't called Process_Gyro_Data() from Disabled_Spin() |
Re: gyro and accelerometer problems
OK! so now it isn't working! I've called several print statements and writing chars. all the appropriate pieces get called, but the value of:
Code:
temp_gyro_rate = (int)Get_ADC_Result(GYRO_CHANNEL) - gyro_bias;the gyro rate is generally around 30 or -31, but jumps around between these, even though the robot is still during calibration, and these don't change when i'm rotating the robot i'm completely stumped... could we need a new gyro? |
| All times are GMT -5. The time now is 09:11. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi