|
actually if you integrate the output from the yaw rate sensors they give us in the kit, you end up with rotation (degrees turned)
and if you are using something like the robot controller, which reads the sensor at fixed intervals, you dont have to convet it to degrees, just use whatever scale it comes out to be.
Then integrating is nothing more that added the sensor number and accumulating the result.
Lets say you start with the sensor centered pointing upwards, and its 'zero' output is 128
you would subtract 128 from each reading (to normalize 'zero' to equal 0, then add it to the accumulated number.
if the sensor starts rotating forwards, the output will go 128, 129, 132... as it accelerates in that direction
and your accumulator will read 0, 1, 5... indicating the amount you are away from center.
the only problem is that after a while the errors will creep into your accumulator, and zero wont be straight up - but its a start anyway.
|