22

Dependencies:   MMA8451Q mbed

Revision:
0:6681d5f7ebda
diff -r 000000000000 -r 6681d5f7ebda main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Apr 02 11:56:23 2017 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "MMA8451Q.h"
+
+MMA8451Q acc(PTE25,PTE24,0X1d<<1);
+Serial pc(USBTX,USBRX);
+
+float xaxis;
+char choice;
+
+main()
+{ 
+    while(1)
+    { 
+    
+    xaxis = acc.getAccX();
+    pc.printf("%0.2f",xaxis);
+    wait(3);
+    }
+}
+    
+