changed 4 years ago
Linked with GitHub

BMI088 → 6 Axis Accelerometer & Gyroscope

The Grove - 6-Axis Accelerometer & Gyroscope (BMI088) is a 6 DoF (degrees of freedom) High-performance Inertial Measurement Unit (IMU) .This sensor is based on BOSCH BMI088, which is a high-performance IMU with high vibration suppression. The 6-axis sensor combines a 16 bit triaxial gyroscope and a 16 bit triaxial accelerometer. Specially, you can use this sensor on the drone and robotics application in demanding environments.

First manually install the Grove BMI088 library:

  1. Go to the repository page.
  2. Click on Code button and in Download ZIP, save the zip file somwhere in your computer.
  3. In the Arduino IDE go to Sketch → Include Library → Add .ZIP Library and slect the file you just downloaded.

Code example

#include "BMI088.h" float ax = 0, ay = 0, az = 0; float gx = 0, gy = 0, gz = 0; int16_t temp = 0; void setup(void) { Wire.begin(); Serial.begin(115200); while (!Serial); Serial.println("BMI088 Raw Data"); while (1) { if (bmi088.isConnection()) { bmi088.initialize(); Serial.println("BMI088 is connected"); break; } else { Serial.println("BMI088 is not connected"); } delay(2000); } } void loop(void) { bmi088.getAcceleration(&ax, &ay, &az); bmi088.getGyroscope(&gx, &gy, &gz); temp = bmi088.getTemperature(); Serial.print(ax); Serial.print(","); Serial.print(ay); Serial.print(","); Serial.print(az); Serial.print(","); Serial.print(gx); Serial.print(","); Serial.print(gy); Serial.print(","); Serial.print(gz); Serial.print(","); Serial.print(temp); Serial.println(); delay(50); }

The output of the accelerometer is best visualized on the Arduino Serial plotter (inside the Tools menu):

Select a repo