9axis-sensor library

Dependents:   HEPTA_SENSOR

Revision:
9:de758e9f9e8e
Parent:
7:3a5b7c76eb48
--- a/Hepta9axis.cpp	Thu Aug 29 02:49:27 2019 +0000
+++ b/Hepta9axis.cpp	Mon Nov 04 16:01:31 2019 +0000
@@ -46,7 +46,7 @@
     n_axis.stop();
 
     double  acc_ax = short((xh<<8) | (xl));
-    *ax = (acc_ax)*2/32764*9.81;
+    *ax = -(acc_ax)*2/32764*9.81;
 
 
 //y-axis
@@ -67,7 +67,7 @@
 
     n_axis.stop();
     double  acc_ay = short((yh<<8) | (yl));
-    *ay = (acc_ay)*2/32764*9.81;
+    *ay = -(acc_ay)*2/32764*9.81;
 
 
 //z-axis
@@ -88,7 +88,7 @@
     n_axis.stop();
 
     double  acc_az = short((zh<<8) | (zl));
-    *az = (acc_az)*2/32764*(-9.81);
+    *az = -(acc_az)*2/32764*(-9.81);
 
 }