Lab 3ES_ John Curran T00214119

Dependencies:   mbed MMA7660

Revision:
3:7380a26ac26f
Parent:
0:bd0546063b0a
Child:
4:efd9328bb9f0
--- a/main.cpp	Tue May 13 18:15:06 2014 +0000
+++ b/main.cpp	Sat Apr 17 15:48:16 2021 +0000
@@ -2,7 +2,7 @@
 
 #include "mbed.h"
 #include "MMA7660.h"
-
+Serial pc(USBTX,USBRX);// serial communications
 MMA7660 MMA(p28, p27);
 
 DigitalOut connectionLed(LED1);
@@ -14,8 +14,8 @@
         connectionLed = 1;
         
     while(1) {
-        Zaxis_p = MMA.z();
-        Zaxis_n = -MMA.z();
+        pc.printf ("%f, %f, %f \r\n", MMA.x(), MMA.y(), MMA.z() );
+        wait (0.5);
     }
 
 }