Fer Pena / Mbed 2 deprecated AccelExample

Dependencies:   MMA8451Q Servo mbed

Files at this revision

API Documentation at this revision

Comitter:
fdopc
Date:
Fri Feb 26 16:12:43 2016 +0000
Parent:
0:c44933f78370
Child:
2:d07fe9f3d109
Commit message:
ss

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Feb 26 16:10:19 2016 +0000
+++ b/main.cpp	Fri Feb 26 16:12:43 2016 +0000
@@ -61,13 +61,14 @@
             wait(0.1);
         }    
             //Read Accel
-            x=acc.getAccX();
+        else{
+             x=acc.getAccX();
             y=acc.getAccY();
             z=acc.getAccZ();
             red=x;
             green=y;
             blue=z;
-        
+        }
     }
 }