I'm calculating a gyro angle to turn to based on the centerX of a contour, and the center of my image
Code:
if (!isTurning) {
turn = (centerX[0] - imageCenter) * degreesPerPixel;
}
isTurning = true;
(Using the LifeCam, and a 320x240 res, degreesPerPixel = 0.18
It seems as if the ADXRS450 does not read 360 degrees per rotation. If I reset the gyro, and spin the robot 360 degrees, the value is somewhere around 320 degrees. I tried multiplying the equation above by 0.8 to compensate, and that worked alright, but it doesn't seem like the optimal solution.