GPIO D10 High-Low Based on Height

Dependencies:   FXOS8700Q mbed

Files at this revision

API Documentation at this revision

Comitter:
chavan
Date:
Fri Mar 30 02:50:50 2018 +0000
Parent:
0:748d42bc36b2
Commit message:
GPIO D10 High-Low Based on Height

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 748d42bc36b2 -r 643da51350f0 main.cpp
--- a/main.cpp	Fri Mar 30 02:48:23 2018 +0000
+++ b/main.cpp	Fri Mar 30 02:50:50 2018 +0000
@@ -41,18 +41,9 @@
         mag.getZ(&fmZ);
         printf("FXOS8700Q ACC: X=%1.4f Y=%1.4f Z=%1.4f ", faX, faY, 1000*faZ);
         printf(" MAG: X=%4.1f Y=%4.1f Z=%4.1f\r\n", fmX, fmY, fmZ);
-       float NewVal, OldVal;        
-        OldVal=faZ;
+
         wait(10);
-        printf("Old  ,   New    = %1.4f,    %1.4f  ", OldVal,NewVal);
-        NewVal = faZ;
-    if (abs((NewVal*1000) - (OldVal*1000))> 10)
-    {
-        printf("Test it is working.!");
-        }
-
-  wait(10);
-  if(1000*faZ<1001)
+        if(1000*faZ<1001)
       {  motorPin = 1;
         cnt = 1;
         wait(10);