Mechatro5 / Mbed OS 9Dsensor_test

Dependencies:   BMX055

Revision:
1:630fac09c3bd
Parent:
0:532ef32974cf
--- a/main.cpp	Thu Oct 24 02:22:43 2019 +0000
+++ b/main.cpp	Tue Dec 10 04:10:35 2019 +0000
@@ -1,9 +1,23 @@
 #include "mbed.h"
+#include "BMX055.h"
 
-// main() runs in its own thread in the OS
+BMX055 bmx(D0,D1);
+
 int main()
 {
-    while (true) {
-
-    }
+    //bmx.mag_calibration();
+    bmx.acc_calibration();
+    /*
+    while(1)
+    {   
+        bmx.Get_acc();
+        printf("ACC:  %+9.4f, %+9.4f, %+9.4f\r\n", bmx.accel[0], bmx.accel[1], bmx.accel[2]);
+        bmx.Get_gyro();
+        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);       
+        bmx.Get_mag();
+        printf("MAG:  %+9.4f, %+9.4f, %+9.4f\r\n",bmx.magnet[0],bmx.magnet[1],bmx.magnet[2]);
+        printf("\n");
+        
+        wait(0.5);
+    }*/   
 }
\ No newline at end of file