![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Elma Kušundžija Ahmed Đuherić
main.cpp
- Committer:
- tim003
- Date:
- 2014-05-15
- Revision:
- 0:a72c23572b07
File content as of revision 0:a72c23572b07:
#include "mbed.h" #include "MMA8451Q.h" #define MMA8451_I2C_ADDRESS (0x1d<<1) MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS); Serial pc(USBTX, USBRX); main() { while(true){ pc.printf("[%.2f,%.2f,%.2f]\n",acc.getAccX(),acc.getAccY(),acc.getAccZ()); wait(1); } }