MPU6886: M5Stack ATOM Matrix
atom_tutorial_mpu6886
code: main.cpp
float ax, ay, az;
float gx, gy, gz;
float temp;
void setup() {
M5.begin(true, false, true);
M5.IMU.Init();
}
void loop() {
M5.IMU.getAccelData(&ax, &ay, &az);
Serial.printf("accel = %f, %f, %f\n", ax, ay, az);
M5.IMU.getGyroData(&gx, &gy, &gz);
Serial.printf("gyro = %f, %f, %f\n", gx, gy, gz);
M5.IMU.getTempData(&temp);
Serial.printf("temp = %f\n\n", temp);
delay(1000);
}