![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Haskovic Nedzad Hadzic Muharem
main.cpp
- Committer:
- tim008
- Date:
- 2014-05-15
- Revision:
- 0:ad87f046ef57
File content as of revision 0:ad87f046ef57:
#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); }