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);