tim010 tim010
/
LV9_Grupa4_Tim010_Zadatak1
Adna Duraković
Revision 0:a3ab69f8944c, committed 2014-05-12
- Comitter:
- tim010
- Date:
- Mon May 12 16:36:19 2014 +0000
- Commit message:
- PAI_LV9_Grupa4_Tim010
Changed in this revision
diff -r 000000000000 -r a3ab69f8944c MMA8451Q.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MMA8451Q.lib Mon May 12 16:36:19 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/JoKer/code/MMA8451Q/#2d14600116fc
diff -r 000000000000 -r a3ab69f8944c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon May 12 16:36:19 2014 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" +#include "MMA8451Q.h" + +#define MMA8451_I2C_ADDRESS (0x1d<<1) + +Serial pc(USBTX, USBRX); +MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS); + +int main() +{ + while(1) + { + pc.printf("%.2f, %.2f, %.2f\n", acc.getAccX(), acc.getAccY(), acc.getAccZ()); + wait(2); + } +} \ No newline at end of file
diff -r 000000000000 -r a3ab69f8944c mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon May 12 16:36:19 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file