Re: Memsic 2125 code?
I gather from the datasheet http://www.parallax.com/dl/docs/prod/acc/memsickit.pdf the 2125 is just an accelerometer, and will give the pulse output based on the G sensed, but not based on angle. Perhaps you don't need an angle, if you are just wanting to keep the nose of your sub pointed at 0 tilt.
This spreadsheet sort of shows the correlation (or lack thereof) between angle and G sensed. It could be used to make a lookup table to determine angle.
http://www.scalerobotics.com
Bookmarks