Hi @NMale.1 ,
the LIS3DH output is on 16 bit in the sense that it is divided on 2 registers of 8 bit each one, for each axis.
However, as reported in the datasheet p. 16, the dataout for each mode is defined as follows:
Can you please check which mode you have enabled?
More in detail, I suggest you to check the lis3dh_reg.c file on Github for the right conversion of the acceleration dataout.
Taking as example the +-2g full scale, you have:
- High-resolution mode (on 12-bit, so only 4 bits of the LSByte are significant):
float lis3dh_from_fs2_hr_to_mg(int16_t lsb)
{
return ( (float)lsb / 16.0f ) * 1.0f;
}
- Normal mode (on 10-bit, so only 2 bits of the LSByte are significant):
float lis3dh_from_fs2_nm_to_mg(int16_t lsb)
{
return ( (float)lsb / 64.0f ) * 4.0f;
}
- Low-power mode (on 8-bit, so only the MSByte is meaningful):
float lis3dh_from_fs2_lp_to_mg(int16_t lsb)
{
return ( (float)lsb / 256.0f ) * 16.0f;
}
-Eleon