I2C Library for the LSM9DS0 IMU

Dependents:   4180_LSM9DS0_lab HW2_P2 HW2_P3 HW2_P4 ... more

Files at this revision

API Documentation at this revision

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
--- 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;
 }