BMX055.h BMX055.cpp main.cpp

Dependencies:   BMX055

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "BMX055.h"
00003 
00004 BMX055 bmx(D0,D1);
00005 
00006 int main()
00007 {
00008     //bmx.mag_calibration();
00009     bmx.acc_calibration();
00010     /*
00011     while(1)
00012     {   
00013         bmx.Get_acc();
00014         printf("ACC:  %+9.4f, %+9.4f, %+9.4f\r\n", bmx.accel[0], bmx.accel[1], bmx.accel[2]);
00015         bmx.Get_gyro();
00016         printf("GYRO: %+9.4f, %+9.4f, %+9.4f\r\n",bmx.gyroscope[0]*125/2048,bmx.gyroscope[1]*125/2048,bmx.gyroscope[2]*125/2048);       
00017         bmx.Get_mag();
00018         printf("MAG:  %+9.4f, %+9.4f, %+9.4f\r\n",bmx.magnet[0],bmx.magnet[1],bmx.magnet[2]);
00019         printf("\n");
00020         
00021         wait(0.5);
00022     }*/   
00023 }