![](/media/cache/profiles/336e4fcc43c1194d7bb9c8fc6188e9b3.50x50_q85.jpg)
this class is meant to deal with the Freescale MMA7455L accelermoter through an SPI interface. it has limtid functionality, but it can be extended to contain more features
main.cpp
- Committer:
- hassan_ali
- Date:
- 2012-02-05
- Revision:
- 0:0d4a1401a9c5
File content as of revision 0:0d4a1401a9c5:
#include "mbed.h" #include "MMA7455L_SPI.h" DigitalOut myled(LED1); Serial pc(USBTX, USBRX); MMA7455L_SPI acc(p5,p6,p7,p14); int main() { while(1) { acc.update_acceleration(); pc.printf("%f %5.3f %5.3f\r\n", acc.Ax, acc.Ay, acc.Az); myled = 1; wait(0.02); myled = 0; wait(0.02); } }