tim007 tim007
/
LV9_Grupa5_Tim007_Zadatak1
Anesa Drakovac Emir Mujačić
Revision 0:6427c1b90439, committed 2014-05-15
- Comitter:
- tim007
- Date:
- Thu May 15 12:20:18 2014 +0000
- Commit message:
- Anesa Drakovac; Emir Muja?i?
Changed in this revision
diff -r 000000000000 -r 6427c1b90439 MMA8451Q.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MMA8451Q.lib Thu May 15 12:20:18 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/JoKer/code/MMA8451Q/#2d14600116fc
diff -r 000000000000 -r 6427c1b90439 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 15 12:20:18 2014 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "MMA8451Q.h" + +Serial pc(USBTX, USBRX); + +#define MMA8451_I2C_ADDRESS (0x1d<<1) + +MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS); +Ticker t; + +void ispisi() +{ + pc.printf("Koordinate X = %f; Y = %f; Z = %f\n",acc.getAccX(), acc.getAccY(), acc.getAccZ()); +} + +int main() +{ + t.attach(ispisi,1); + while(1) + { + } +}
diff -r 000000000000 -r 6427c1b90439 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 15 12:20:18 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file