cancel
Showing results for 
Search instead for 
Did you mean: 

Temperature reading from LSM9DS1

PRebo.1
Associate II

When reading the temperature from a LSM9DS1, what's the unit that is used ? Cº ?

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @PRebo.1​ ,

The measurement unit is °C, but you have to convert the 16bit value into °C according to the 16 LSB/°C, as described in the datasheet, p. 14.

I suggest you to check also the C drivers on Github for the LSM9DS1, in particular the lsm9ds1_reg.c file and the LSB-to-degC conversion formula:

float_t lsm9ds1_from_lsb_to_celsius(int16_t lsb)
{
  return (((float_t)lsb / 16.0f) + 25.0f);
}

Please let me know if this answers your question.

-Eleon