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:
#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):
References
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing