Testsetup BMI088 (SEED), gyro ok, Acc Problem T:\T-IMS-IndNav\01_Technisches\70_Hardwareentwicklung\20190828_083342.jpg
Dependencies: mbed
main.cpp
- Committer:
- altb2
- Date:
- 2019-08-28
- Revision:
- 0:577a6606809f
File content as of revision 0:577a6606809f:
#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); } }