1.测试了QMI8658的驱动,正常读出x,y,z轴数据,得到的pitch, roll, yaw正常

This commit is contained in:
Misaki
2025-08-23 01:13:16 +08:00
parent 48c2757af6
commit 80cfbec7df
10 changed files with 594 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
//
// Created by misaki on 2025/8/23.
//
#include <esp_log.h>
#include <I2C_Driver.h>
#include <QMI8658.h>
extern IMUdata Accel;
extern IMUdata Gyro;
void imu_test(void)
{
I2C_Init();
QMI8658_Init();
while (1) {
QMI8658_Loop();
ESP_LOGI("app_main", "Accel x: %f, y: %f, z: %f", Accel.x, Accel.y, Accel.z);
ESP_LOGD("app_main", "Gyro X: %f, Y: %f, Z: %f", Gyro.x, Gyro.y, Gyro.z);
}
}
+12
View File
@@ -0,0 +1,12 @@
//
// Created by misaki on 2025/8/23.
//
#ifndef BIONIC_SPHERE_DRIVERS_TEST_H
#define BIONIC_SPHERE_DRIVERS_TEST_H
// imu测试
void imu_test(void);
#endif //BIONIC_SPHERE_DRIVERS_TEST_H