November 17, 2024, 12:50:29 AM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


Can the Memsic 2125 sensor be used with the Prop-1?

Started by JonWestcot, June 13, 2008, 07:46:54 PM

Previous topic - Next topic

JonWestcot

Hi:

Just wondering if the Prop-1 can be connected to the Memsic 2125 sensor and can read its outputs correctly, or if the sensor requires using a BS2 or SX chip.  All the demo code I can find for its use uses a BS2, but I don't have any Prop-2s (yet).

Thanks for any help you can provide.

Jon

JonnyMac

June 16, 2008, 05:57:49 AM #1 Last Edit: June 16, 2008, 06:03:28 AM by JonnyMac
Sure, but with the Prop-1's (BS1's) limited resources I would use the raw values (after some experimentation) and not try to calculate actual g force.  You can use PULSIN just as in the Parallax documentation.  For example:

  PULSIN 0, 1, gForce

Where the X output pin is connected to P0, and gForce is a Word variable.  At 0g you should get about 500 (5 milliseconds / 10 uS) in gForce.

Jon McPhalen
EFX-TEK Hollywood Office

JonWestcot

Hi Jon:

Thanks for the info.  And I'm not really worried about trying to convert the values into "actual" degrees; what I'm really wanting is to know when motion starts and stops, and this seemed like the best sensor for that.  I'm assuming that I can poll both the X axis and Y axis pins, just witih two subsequent PULSIN commands, right?

Jon

JonnyMac

Yep -- you'll need two pins, of course.  If I did my math correctly, you should get a value of 500 at 0g on either axis.
Jon McPhalen
EFX-TEK Hollywood Office