By pOOPOO

Dependencies:   MX28 mbed

Fork of LSM9DS1_project_5_zerotorque by Rong Syuan Lin

Revision:
9:07de3af99031
Parent:
0:c23e915f255b
Child:
10:6a9de32601b1
--- a/LSM9DS1.cpp	Tue Aug 14 06:22:27 2018 +0000
+++ b/LSM9DS1.cpp	Mon Nov 05 09:29:20 2018 +0000
@@ -114,7 +114,7 @@
     // Write the address we are going to read from and don't end the transaction
     i2c.write(xgAddress, &subAddress, 1, true);
     // Read in all 8 bit registers containing the axes data
-    i2c.read(xgAddress, data, 6);
+    i2c.read(xgAddress, data, 6, false);
 
     // Reassemble the data and convert to g
     ax_raw = data[0] | (data[1] << 8);
@@ -365,7 +365,7 @@
     switch (aScale)
     {
         case A_SCALE_2G:
-            aRes = 2.0 / 32768.0;
+            aRes = 0.061e-3;
             break;
         case A_SCALE_4G:
             aRes = 4.0 / 32768.0;