cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DH Digital data readout conversion to G

fleming
Associate
Posted on September 05, 2014 at 16:24

I'm struggling to understand the correct method/formula to convert the digital reading of the accelerometer to G units (LIS2DH). The data sheet states that The value is expressed as two’s complement left justified. I have the sensor running in high resolution mode. I'm not sure if my formula is correct as well.

#define SENSITIVITY 0.001#define OG_OFFSET 0.50 unsigned int X_16BIT_AXIS2 = (X_16BIT_AXIS >>4); char G_X_AXIS = SENSITIVITY*(X_16BIT_AXIS2-OG_OFFSET);

#lis2dh
0 REPLIES 0