tim003 tim003
/
LV9_Zadatak1_Grupa6_Tim003
Armin Klacar Ensar Muratovic
Revision 0:f56dec83ad61, committed 2014-05-15
- Comitter:
- tim003
- Date:
- Thu May 15 14:44:08 2014 +0000
- Commit message:
- LV9-ZAD1-Grupa6-Tim003
Changed in this revision
diff -r 000000000000 -r f56dec83ad61 MMA8451Q.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MMA8451Q.lib Thu May 15 14:44:08 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/emilmont/code/MMA8451Q/#c4d879a39775
diff -r 000000000000 -r f56dec83ad61 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 15 14:44:08 2014 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "MMA8451Q.h" +#define MMA8451_I2C_ADDRESS (0x1d<<1) + +Serial pc(USBTX, USBRX); +MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS); +Ticker t; + +void display() +{ + pc.printf("{x,y,z} = {%f,%f,%f} \n",acc.getAccX(),acc.getAccY(), acc.getAccZ()); +} + +int main() +{ + t.attach(display,1); + while(1); +} \ No newline at end of file
diff -r 000000000000 -r f56dec83ad61 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 15 14:44:08 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file