Mechatro5 / Mbed OS 9Dsensor_test

Dependencies:   BMX055

Files at this revision

API Documentation at this revision

Comitter:
yasunorihirakawa
Date:
Tue Dec 10 04:10:35 2019 +0000
Parent:
0:532ef32974cf
Commit message:
BMX055

Changed in this revision

BMX055.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BMX055.lib	Tue Dec 10 04:10:35 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/Mechatro5/code/BMX055/#f9912f16188c
--- 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