I2C Library for the LSM9DS0 IMU
Dependents: 4180_LSM9DS0_lab HW2_P2 HW2_P3 HW2_P4 ... more
Revision 2:5556e6fb99f5, committed 2015-02-02
- Comitter:
- aswild
- Date:
- Mon Feb 02 21:47:14 2015 +0000
- Parent:
- 1:7c1e26d377ed
- Commit message:
- Added 25C bias to readTemp() function
Changed in this revision
LSM9DS0.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7c1e26d377ed -r 5556e6fb99f5 LSM9DS0.cpp --- a/LSM9DS0.cpp Mon Jan 26 06:38:38 2015 +0000 +++ b/LSM9DS0.cpp Mon Feb 02 21:47:14 2015 +0000 @@ -141,7 +141,7 @@ // Temperature is a 12-bit signed integer temperature_raw = (((int16_t) temp[1] << 12) | temp[0] << 4 ) >> 4; - temperature_c = (float)temperature_raw / 8.0; + temperature_c = (float)temperature_raw / 8.0 + 25; temperature_f = temperature_c * 1.8 + 32; }