OK, I give up. I never claimed to be a programmer (I live in an analog world!) But I've been trying to figure out how to integrate the rotational velocity output of the gyro to degrees of heading information. All I really need to do is determine when I have completed a 90 degree turn, either to the right or the left.
I understand how the how the gyro works, how it interfaces to the analog port, and how the resulting bit count (0-254) relates to rotational velocity. I can even figure out how to sample that each loop cycle time (26 msec.) and accumulate delta_heading changes. What I can't figure out is how to do it WITHOUT FLOATING POINT MATH!
I know there must be a way to scale the gyro output and manipulate it with integer math to figure out when it has rotated 90 degrees, but I just have no experience with integer math.
Please, someone, how about a hint of the pbasic code required. Someone must have done this already?
Thanks,
Bruce C.
