sparkfun/SparkFun_LSM9DS1_Arduino_Library

Incorrect temperature sensor readouts

Nufflee opened this issue · 1 comments

The LSM9DS1::readTemp() doesn't seem to read the correct value from the sensor - it reads either reads 277 or 278 (°C?) all of time.

This is my code (LSM9DS1 is initialized and everything beforehand):

...
// called by Arduino loop()
void IMU::update()
{
  ....
  if (sensor.tempAvailable())
  {
    sensor.readTemp();
  }
}

float IMU::getTemperature()
{
  return sensor.temperature;
}

I'm also using STM32duino on a STM32F4 board but that shouldn't be the issue. Other readouts seem to be correct as well.

cc @Grahldg

Thank you for bringing this issue to SparkFun's attention! After some testing, we have determined the temperature sensor to be nonfunctional. It is unclear if the temperature sensor on the LSM9DS1 ever worked properly. We recommend you use a product which is better equipped to deal with temperature readings.