This program is an example of interfacing MMA7361 Breakout board with mbed with published library

Dependencies:   MMA7361L mbed

Files at this revision

API Documentation at this revision

Comitter:
Parkz
Date:
Fri Oct 11 16:21:30 2013 +0000
Commit message:
Interfacing MMA7361 Breakout board

Changed in this revision

MMA7361L.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 f930f6cb7cc9 MMA7361L.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MMA7361L.lib	Fri Oct 11 16:21:30 2013 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/JST2011/code/MMA7361L/#8bdd5a9f289e
diff -r 000000000000 -r f930f6cb7cc9 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 11 16:21:30 2013 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "MMA7361L.h"
+MMA7361L acc(p15,p16,p17,p18);
+Serial pc(USBTX,USBRX);
+int main()
+{
+float x,y,z;
+while(1)
+{
+acc.prepare();
+x=acc.getAccelX();
+y=acc.getAccelY();
+z=acc.getAccelZ();
+pc.printf("x=%f\ny=%f\nz=%f",x,y,z);
+wait(2);
+}
+}
\ No newline at end of file
diff -r 000000000000 -r f930f6cb7cc9 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Oct 11 16:21:30 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file