tim010 tim010
/
lv9_grupa5_tim010_zad1
Amela Spica Muris Nuhodzic
Revision 0:dc991647899f, committed 2014-05-15
- Comitter:
- tim010
- Date:
- Thu May 15 12:23:08 2014 +0000
- Commit message:
- Amela Spica; Muris Nuhodzic
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MMA8451Q.lib Thu May 15 12:23:08 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 Thu May 15 12:23:08 2014 +0000 @@ -0,0 +1,16 @@ +#include "MMA8451Q.h" +#define MMA8451_I2C_ADDRESS (0x1d<<1) + +Serial pc(USBTX, USBRX); +MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS); //ispravljeno sa P_E25, P_E26 + +Ticker t; + + +void ispis() { + pc.printf("X = %f, Y = %f, Z = %f\n", acc.getAccX(), acc.getAccY(), acc.getAccZ()); +} + +int main() { + t.attach(&ispis, 1); +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 15 12:23:08 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file