Testsetup BMI088 (SEED), gyro ok, Acc Problem T:\T-IMS-IndNav\01_Technisches\70_Hardwareentwicklung\20190828_083342.jpg

Dependencies:   mbed

Revision:
0:577a6606809f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Aug 28 08:32:22 2019 +0000
@@ -0,0 +1,45 @@
+#include "mbed.h"
+#include "BMI088.h"
+/* Testsetup fuer SEED BMI088 siehe 
+T:\T-IMS-IndNav\01_Technisches\70_Hardwareentwicklung\20190828_083342.jpg             
+*/
+
+
+DigitalOut myled(LED1);
+
+Serial pc(SERIAL_TX, SERIAL_RX);
+Timer ti;
+
+BMI088 bmi088;
+
+int main() {
+    pc.baud(115200);
+    ti.start();
+    ti.reset();
+    float x,y,z;
+    pc.printf("BMI088 Raw Data\r\n");
+    wait_ms(100);
+    //bmi088.resetAcc();
+    while(1)
+    {
+        if(bmi088.isConnection())
+        {
+           bmi088.initialize();
+            pc.printf("BMI088 is init and connected\r\n");
+            break;
+        }
+        else pc.printf("BMI088 is not connected\r\n");
+        
+        wait_ms(500);
+        }
+    //bmi088.resetAcc();
+    wait_ms(500);
+    while (1) {
+        bmi088.getGyroscope(&x,&y,&z);
+        printf("%2.2f %2.4f %2.4f %2.4f  \r\n",ti.read(),x,y,z);
+        //wait_ms(1);
+        bmi088.getAcceleration(&x,&y,&z);    // Accel does not work!!!???
+        printf("%2.4f %2.4f %2.4f \r\n",x,y,z);
+        wait(.2);
+    }
+}