sparkfun / SparkFun_LSM9DS1_Arduino_Library

Arduino library for the LSM9DS1 9DOF IMU.
Other
64 stars 78 forks source link

Incorrect temperature sensor readouts #20

Closed Nufflee closed 5 years ago

Nufflee commented 5 years ago

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

andreadevo commented 5 years ago

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.