GY-511 LSM303

Hi everybody,

I need your help :slight_smile:

I have a GY-511 (or LSM303), and i would like to display the global acceleration (i mean acceleration of x,y,z in one acceleration)

for exemple : i move the accelerometer and it displays a=2 (m/s²)

My problem, is that my accelerometer, without moving, display accelerations between 1 and 10 (m/s²)
Of course, if i move the direction of the accelerator, the numbers change...

Also my question is : how can i reset informations at the begining, in order to display 0 for each axis, and then, find the right acceleration?

Thank you very much !!!

when no acceleration (or spin) you should find gravity ; sqrt(x^2 + y^2 + z^2) close to 9.8

If possible, keep the board at a fixed angle (horisontal is good)
Use the same formula , but substract gravity from vertical axis.