Quote:
|
Originally Posted by Dave Flowerday
Is your +5v actually higher than 5?
|
A volt meter shows the power that the analog input is supplying as 4.99 V.
Quote:
|
Originally Posted by Dave Flowerday
As for the problem with the middle value not always being 512
|
It's actually never 512. It's always right around 523. The voltage we get when measuring it with a volt meter is 5.544 V (although it shows 5.500 V when supplied with a DC power supply on the bench top).
Our main problem is the difference in the range of numbers between the null and the maximum counterclockwise rotation (which the RC reads as 2 when
printf'd back to the computer though the serial connection) and maximum clockwise rotation (which is 1006).
The null value (not moving) is always around 523. This gives us more numbers below the center, null value, than above.
523-2 =
521 range below null
1006-523 =
483 range above null
We are adding the analog input values (minus 523) to form a heading. We reset the heading several loops after it begins to make sure the input from the gyro has stabilized. When we turn to around the 90º mark and then back to the starting location, we are not seeing the numbers anywhere close to zero again (the number at which we start the variable that holds the accrued total number of counts).
When we start at zero and make a right (clockwise) turn, the 90º point is about 8453 but when we turn back to the starting location (the point that should read zero), it reads about -460. The opposite turn (counterclockwise) goes to about -8888 around the 90º mark and reads about -300 when we turn back to our staring point instead of reading zero.