tim008 tim008
/
LV9-Pai-grupa7-tim8-zad1
Emrah Dautbegović Edis Kunić
Revision 0:6df852bbe791, committed 2014-05-15
- Comitter:
- tim008
- Date:
- Thu May 15 16:39:27 2014 +0000
- Commit message:
- LV9-PAI-GRUPA7-TIM8-ZAD1;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MMA8451Q.lib Thu May 15 16:39:27 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/Future_FThierry/code/MMA8451Q/#9e6dc5a4ca82
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 15 16:39:27 2014 +0000 @@ -0,0 +1,17 @@ + +#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 procitaj() { + pc.printf("X-osa: %.3f Y-osa: %.3f Z-osa: %.3f \n\r", acc.getAccX(), acc.getAccY(), acc.getAccZ()); + } + + int main() { + t.attach(procitaj, 1.5); + while (1); + } \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 15 16:39:27 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file