Accelerometer Polling

C, C++, and Visual C++

Accelerometer Polling

Postby wheatfieldcrows » Wed Aug 12, 2009 6:41 pm

I am just starting out in programming of phidgets. I have the 3-axis accelerometer and would like to poll it, lets say, once a second. I have looked through as much information as I can find, but phidgets is so event based I can't seem to think of a way to get it to report back on a schedule.

I would like to log accelerations on a small boat due to waves and the data needs to be evenly spaced in time.

Any recommendations?


Re: Accelerometer Polling

Postby PhidgetsGuy » Thu Aug 13, 2009 9:33 am

You could try setting up a timer to poll as often as you need and then simply call the acceleration function to retrieve the data.

CPhidgetAccelerometer_getAcceleration (CPhidgetAccelerometerHandle phid, int index, double *acceleration)

That function should be what you are looking for.

Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 2 guests