First try success? Nice!
Maybe you are already converting feet to meters in your code, but this seems to work for me. And I think it is better than a new metric lookup table, because there are more feet per increment, which should make it more accurate.
Code:
if metric = 1 then 'convert from feet to meters
finalALT = finalalt * 2500
finalALT = div32 8203
endif
So it looks like you are making an altitude hold circuit. An altitude hold has been on my back burner for a few years now. Darrel's code has really made part of this easy, so it looks like I may be able to move this up a burner or two myself!
How smooth is your servo at 4 mhz and 8 mhz? I would think that 20 mhz would be a bit smoother for sensing pulse width, but have not tried the lower mhz.
http://www.scalerobotics.com
Bookmarks