Memsic 2125 code?


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Memsic 2125 code?

    Calculating degrees from an accelerometer is rather involved. You need some trig functions. Looks like these guys did it with ArcCosine and ArcSine http://www.parallax.com/dl/docs/prod/acc/memsickit.pdf . Or it could be done with ArcTan: http://www.picbasic.co.uk/forum/cont...-axis-g-sensor (different sensor, but tilt degree math will work on any sensor)

    This gentleman used the Memsic 2125 sensor, and his code might be a little easier, with less resolution. Check out his tilt code in the middle of his code at GetSensors:
    http://www.picbasic.co.uk/forum/cont...-(open-source)
    http://www.scalerobotics.com

  2. #2
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Memsic 2125 code?

    Thanks Walter!
    Yes I have looked at the code(s) you referenced and to be perfectly honest the code is completely confusing and way over my head. The spec sheet I believe says that the sensor puts out a square wave that varies in time so "Pulsin" would read the sensors outputs. Where I become completely lost is it would seem there would be a fairly simple conversion from pulse width to angle? Best, Ed

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts