three axis accelerometer shown as degrees for arccosine

Dependencies:   MMA8451Q SLCD_degrees mbed

Fork of ACC_LCD_341_trig by Stanley Cohen

Revision:
6:238277171159
Parent:
5:75c5e67ef9f1
--- a/acc_angles.cpp	Tue Dec 13 02:24:37 2016 +0000
+++ b/acc_angles.cpp	Wed Feb 15 03:13:17 2017 +0000
@@ -106,7 +106,7 @@
             }
 #endif
             if(fabs(axisValue[currentAxis]) > 1.0) axisValue[currentAxis] = 1.0; 
-            angleValue[currentAxis] = asin(axisValue[currentAxis]) * PITODEG / PI;
+            angleValue[currentAxis] = acos(axisValue[currentAxis]) * PITODEG / PI;
             LCDsignedAngle(angleValue[currentAxis]);
             //LCDsignedFloat(axisValue[currentAxis]);              
        }