..

Dependencies:   MMA8451Q mbed

Files at this revision

API Documentation at this revision

Comitter:
anmolhardik
Date:
Thu Feb 09 13:37:53 2017 +0000
Commit message:
aa;

Changed in this revision

MMA8451Q.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 41d19da75f23 MMA8451Q.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MMA8451Q.lib	Thu Feb 09 13:37:53 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/emilmont/code/MMA8451Q/#c4d879a39775
diff -r 000000000000 -r 41d19da75f23 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Feb 09 13:37:53 2017 +0000
@@ -0,0 +1,22 @@
+#include"mbed.h"
+#include "MMA8451Q.h"
+
+Serial pc (USBTX,USBRX);
+MMA8451Q acc(PTE25,PTE24,0x1d<<1);
+ int main()
+{
+    float x,y,z;
+    while(1)
+    {
+        x=(acc.getAccX()+2)*100;
+        y=(acc.getAccY()+2)*100;
+        z=(acc.getAccZ()+2)*100;
+        pc.printf("$%d %d %d;",x,y,z);
+        
+        
+
+        wait(2.0);
+        
+    }
+}
+ 
\ No newline at end of file
diff -r 000000000000 -r 41d19da75f23 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Feb 09 13:37:53 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/176b8275d35d
\ No newline at end of file