Hi, We currently developing the software for bno085, we find that the accelearation is giving stable output but the gyro reading is floating around. Here is our initialization code. We use the bno08x driver as the baseline. /******************************************************************************* * Copyright(c) <2021>, Along * * Description: * @file imu_test.c * * @brief * * This file contains the Test Application for imu * * Author - Along * ******************************************************************************* * * History * * Dec/13/2022, Along, Created * * ******************************************************************************/ /******************* * Includes *******************/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #define IOCTL_MODULE "/dev/app_ioctl" #define IMU_SENSOR_DATA _IOR('a',12,int32_t*) struct bmi_sensor_data { int16_t accel_x; int16_t accel_y; int16_t accel_z; int16_t gyro_x; int16_t gyro_y; int16_t gyro_z; }; int main() { int ret = 0; struct bmi_sensor_data sensor_data = {0}; int fd = open(IOCTL_MODULE, O_RDWR); if(fd < 0) { printf("zxj ============open %s fail!\n", IOCTL_MODULE); return -1; } while(1) { ret = ioctl(fd, IMU_SENSOR_DATA, &sensor_data); printf("App Acc_Raw_X : %d Acc_Raw_Y : %d Acc_Raw_Z : %d \n", sensor_data.accel_x, sensor_data.accel_y, sensor_data.accel_z); printf("Gyr_Raw_X : %d Gyr_Raw_Y : %d Gyr_Raw_Z : %d \n", sensor_data.gyro_x, sensor_data.gyro_y, sensor_data.gyro_z); } close(fd); return 0; }
... View more