Skip to main content
Visitor II
January 8, 2021
Question

Temperature reading from LSM9DS1

  • January 8, 2021
  • 1 reply
  • 949 views

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

    This topic has been closed for replies.

    1 reply

    ST Employee
    January 11, 2021

    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