Nedim Hozić Selma Tucak

Dependencies:   MMA8451Q mbed

Files at this revision

API Documentation at this revision

Comitter:
tim003
Date:
Thu May 15 16:46:26 2014 +0000
Commit message:
PAI-LV9-Grupa7-Tim003-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 27d7523a6ef9 MMA8451Q.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MMA8451Q.lib	Thu May 15 16:46:26 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/JoKer/code/MMA8451Q/#2d14600116fc
diff -r 000000000000 -r 27d7523a6ef9 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu May 15 16:46:26 2014 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "MMA8451Q.h"
+#define MMA8451_I2C_ADDRESS (0x1d<<1)
+
+MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS);
+Ticker t;
+Serial pc(USBTX, USBRX);
+
+void prikazi()
+{
+    pc.printf("(x,y,z) = (%f, %f, %f) \n", acc.getAccX(), acc.getAccY(), acc.getAccZ());
+}
+
+int main() {
+    t.attach(prikazi, 1);
+    while(1);
+}
diff -r 000000000000 -r 27d7523a6ef9 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu May 15 16:46:26 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776
\ No newline at end of file