Mirza Omerović Goro Faruk

Dependencies:   MMA8451Q mbed

Files at this revision

API Documentation at this revision

Comitter:
tim007
Date:
Mon May 12 14:35:12 2014 +0000
Commit message:
LV9-PAI-Grupa003-Zadatak1

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 f7cf9c4220dd MMA8451Q.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MMA8451Q.lib	Mon May 12 14:35:12 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/JoKer/code/MMA8451Q/#2d14600116fc
diff -r 000000000000 -r f7cf9c4220dd main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon May 12 14:35:12 2014 +0000
@@ -0,0 +1,16 @@
+
+#include "mbed.h"
+#include "MMA8451Q.h"
+#define ADDRESS (0x1d<<1)
+#define SDA PTE25
+#define SCL PTE24
+ 
+Serial pc(USBTX, USBRX);
+ 
+int main() {
+    MMA8451Q acc(SDA, SCL, ADDRESS);
+    while(1) { 
+       pc.printf("X osa: %lf, Y osa: %lf, Z osa: %lf \n", acc.getAccX(), acc.getAccY(), acc.getAccZ());
+       wait(1);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r f7cf9c4220dd mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon May 12 14:35:12 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776
\ No newline at end of file