Am using arduino nano 33 Ble and am using the Lib Arduino_LSM9DS1 am trying to understand the equation but i dont get it
the say data[0]*4/32768 wher the lsb 32768. it should be a 16 bit rigester where the lsb should 2^16 = 65536. or hier they use -+ 32768 ? and what exactly 4 ? why the use this rang not a an 8 or 16 ?
can somone explin it to me ? and how exactly get the acceleration and in which unit ?
int LSM9DS1Class::readAcceleration(float& x, float& y, float& z)
{
int16_t data[3];
if (!readRegisters(LSM9DS1_ADDRESS, LSM9DS1_OUT_X_XL, (uint8_t*)data, sizeof(data))) {
x = NAN;
y = NAN;
z = NAN;
return 0;
}
x = data[0] * 4.0 / 32768.0;
y = data[1] * 4.0 / 32768.0;
z = data[2] * 4.0 / 32768.0;
return 1;
}