Programa que utiliza el acelerometro por I2C, y envia la información por comunicacion serial de los valores x, y, z.

Dependencies:   mbed MMA8451Q

Revision:
1:bcfd1e856c37
Parent:
0:0b798b845ac3
--- a/main.cpp	Mon Oct 14 02:39:31 2019 +0000
+++ b/main.cpp	Mon Oct 14 02:52:25 2019 +0000
@@ -23,7 +23,6 @@
     MMA8451Q acc(SDA, SCL, MMA8451_I2C_ADDRESS);
     PwmOut rled(LED2);
     PwmOut gled(LED1);
-    PwmOut bled(LED3);
     
     pc.baud(115200);
     pc.printf("Acelerometro con FRDM-K64F board.\n");
@@ -38,7 +37,6 @@
         z = abs(acc.getAccZ());
         rled = 1.0f - x;
         gled = 1.0f - y;
-        bled = 1.0f - z;
         wait(0.5f);
         pc.printf("X: %1.2f, Y: %1.2f, Z: %1.2f\n", x, y, z);
     }