Accelerometer RD3152MMA7260Q C++ Demo Application

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accelerometer RD3152MMA7260Q C++ Demo Application

2,956 Views
Arv
Contributor I
I have recently purchased a RD3152MMA7260Q Accelerometer.  I have been through the website pages, PDF files and various code downloads BUT there is no reference given on how to extract the data from the unit using C++ code running on windows.  I am currently working with visual studio 2005.NET C++.
 
They have provided a lovely application (made in c++) called RD3152MMA7260Q_SW.exe (created by Rod Borras) in a folder called Visual c++ GUI provided on a cd shipped with hardware, but have given no reference what so ever on how such an application can be created.  Actually this application has a tool called the tilt measurment tool, and its ibtaining data from the acceleromter and displaying it in on the screen to show the tilt movements in the x, y and z plane.  This is exactly the sort of application i need to integrate into my software. 
 
Can someone please help?
 
Thank you very much in advance.
 
 
0 Kudos
3 Replies

1,494 Views
mke_et
Contributor IV
I've played with an accerometer.

To use it as a 'tilt' sensor you need more than one axis. The device in freespace should read '0' in all axis. Since you don't have freespace on earth, you need to read the device 'on axis'. That is, with one axis aligned with gravity. Any other axis should be '0'. The axis in line will represent a reading for 1G. Now turn the device 'over'. That same axis reading will now represent -1G. You can do the same for each of your axis. You should also be verifying your '0' measurement on your other axis.

To do 'tilt', you now just calculate back pluging your G values back into standard trig functions. Assuming that your sensor is at rest, or at least under no acceleration in any dimension.
0 Kudos

1,494 Views
Arv
Contributor I
I want to know where i can find the API please!!!
0 Kudos

1,494 Views
mke_et
Contributor IV
API???

Well, first off, I do/did everything in assembly. All I did was tie the device to A2D channels on the 9S12. Read the A2D. Then process the info.
0 Kudos