tim003 tim003
/
LV9_Grupa3_Tim003_Zad1
Adnan Kicin Repuh Sahin
Revision 0:150fd6d812b2, committed 2014-05-12
- Comitter:
- tim003
- Date:
- Mon May 12 14:34:57 2014 +0000
- Commit message:
- LV9_Grupa3_Tim003_Zad1
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MMA8451Q.lib Mon May 12 14:34:57 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/JoKer/code/MMA8451Q/#2d14600116fc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon May 12 14:34:57 2014 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" +#include "MMA8451Q.h" + +#define MMA8451_I2C_ADDRESS (0x1d<<1) +MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS); + +Serial pc(USBTX, USBRX); + +int main() { + while(1) { + pc.printf("\nX-osa: %f Y-osa: %f Z-osa: %f", acc.getAccX(), acc.getAccY(), acc.getAccZ()); + wait(1); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon May 12 14:34:57 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file