I have some trouble using the ADXL202E accelerometer. Has anyone got some code to decode the signals from the accelerometer (I use it as a digital accelerometer)?
I tried using the code from the Memsic2125 example, but the numbers I get are weird.
Do you mean accelerate the chip or just "move the chip"?
An accelerometer doesn't return anything at constant velocity.
I doubt you've got long enough wires to accelerate it very far.
The simplest test for an accelerometer is to sit it still on a desk.
You should get nice steady values, maybe changing by a few counts.
Now tip it so one axis points straight downwards.
You should see a larger change on that axis - the difference between the reading and the horizontal steady state should be 1g.
Now tip it so that the other direction of the same axis points down.
Check the values agree; if you got +1g before, you should now have -1g, and vice versa.
Repeat for all axes.
But I don't suppose the code would work "just like that" when it's actually for another accelerometer (it's for the 2125)...? The PWM signal from the ADXL202E is adjustable (T2 by Rset).
Edit: Oh and of course I meant accelerate the chip... That's what I said, and I know the difference.