Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 4180_LSM9DS0_lab HW2_P2 HW2_P3 HW2_P4 ... more
Diff: LSM9DS0.cpp
- Revision:
- 2:5556e6fb99f5
- Parent:
- 0:3a1dce39106c
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; }