22

Dependencies:   MMA8451Q mbed

main.cpp

Committer:
prtkmynk
Date:
2017-04-02
Revision:
0:6681d5f7ebda

File content as of revision 0:6681d5f7ebda:

#include "mbed.h"
#include "MMA8451Q.h"

MMA8451Q acc(PTE25,PTE24,0X1d<<1);
Serial pc(USBTX,USBRX);

float xaxis;
char choice;

main()
{ 
    while(1)
    { 
    
    xaxis = acc.getAccX();
    pc.printf("%0.2f",xaxis);
    wait(3);
    }
}