Hi everyone,
we have entered the last day of training for us (we are flying to america on monday!) and our Gyro suddenly became odd- when we turn it somewhere, it begins to count and gets to 15000~…
has anyone expirienced something like this before?
is it a problem with the sensor, the wiring, or the program?
Any comment or advice would be extremely helpful!
Thanks, Ziv
Which direction are you turning and at what speed?
Is it any different than what you were doing before?
Are you using Kevin’s or your own code, EasyC, or RobotC?
i know they are using Kevin’s code.
i think the direction doesn’t meeter, happens in both, and they did not have a gyro before.
don’t count on the i think thing though =]
Almost correct Liron
We’ve had a gyro and it is acting the same way as the new one…
if you have any more questions we would love to help you help us.
Are you using any interrupts?
yes, we are using Kevin’s original code…
Interrupts can corrupt the gyro variable.
To solve this problem, you need to make a secondary variable that holds the gyro value from the last cycle, and if your actual value changes drastically, then you will replace it with the old value and continue.
We had the same exact problem and now it is fixed.
Hope that this helped,
have a safe trip,
see you in Atlanta;)
are you letting it calculate the bias?
yes… we are letting it calculate as in Kevin’s original code - j < 300
Is it increasing even when you stand still?
Also, look at the ADC input - is that fairly static or is it rapidly changing when the robot stands still?
Check your wiring to your analog input.
An unconnected analog input will “count” up like you describe. I suspect you may have a broken wire, or a disconnected wire.
I second that. The pullup resistor and low pass capacitor in the analog input circuitry will combine to pull the voltage up to VCC slowly in the absence of an input.
Could you possibly tell us hoe to wire it? and if you have ready we also need the wiring of the GTS and the IR…
The usfirst.org website has a sensor guide that will describe the different pins and what they are for. Likewise, the email they sent out in December has a link that has a .pdf file that describes how to wire the IR board.