tim007 tim007
/
LV9-PAI-Grupa003-Zadatak1
Mirza Omerović Goro Faruk
Diff: main.cpp
- Revision:
- 0:f7cf9c4220dd
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