9axis-sensor library

Dependents:   HEPTA_SENSOR

Files at this revision

API Documentation at this revision

Comitter:
HeptaSatTraining2019
Date:
Mon Nov 04 16:01:31 2019 +0000
Parent:
7:3a5b7c76eb48
Commit message:

Changed in this revision

Hepta9axis.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 3a5b7c76eb48 -r de758e9f9e8e Hepta9axis.cpp
--- 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);
 
 }