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

Dependencies:   mbed MMA8451Q

Files at this revision

API Documentation at this revision

Comitter:
marcospostemsky
Date:
Mon Oct 14 02:52:25 2019 +0000
Parent:
0:0b798b845ac3
Commit message:
Elimino blue led, no existe en la placa kl46z

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 0b798b845ac3 -r bcfd1e856c37 main.cpp
--- 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);
     }