sparkfun / SparkFun_LSM9DS1_Arduino_Library

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

Temperature sensor read #13

Closed tchristle closed 6 years ago

tchristle commented 7 years ago

It does not seam like the correct value is being read from the temperature sensor. The only values i see from it are 256, 512, 768 and 1024. I am using the following lines to read the temperature.

imu.settings.temp.enabled = true;
imu.readTemp();
Serial.print("T: ");
Serial.println(imu.temperature);
Grahldg commented 6 years ago

The calculation of temperature was incorrect. I updated it according to the datasheet and tested it against another sensor. The latest commit reflects these changes. If you're still having issues please let me know.