I made a custom board with esp32-c6 and bmi088, communicating via I2C. The problem is I couldn't read the proper data from the sensor. The data is shifted without me touching the board.I found the similar problems and solution from the thread but none of it could't solve my problem. My data looks like this. I (654546) IMU: X = 6 Y = 13 Z = 8 I (655546) IMU: X = 14 Y = 65530 Z = 65531 I (656546) IMU: X = 8 Y = 65528 Z = 9 I (657546) IMU: X = 22 Y = 65520 Z = 4 I (658546) IMU: X = 2 Y = 65519 Z = 65533 I (659546) IMU: X = 65535 Y = 65532 Z = 65528 I (660546) IMU: X = 9 Y = 19 Z = 6 Here is my code. I tried to change the variable but didn't work. void readAccel(void){
uint8_t accel_raw[6];
ESP_ERROR_CHECK(register_read(ACCEL_SENSOR_ADDR, ACCEL_XOUT_H, accel_raw, 6));
rawData.ax = (accel_raw[1] << 😎 | accel_raw[0];
rawData.ay = (accel_raw[3] << 😎 | accel_raw[2];
rawData.az = (accel_raw[5] << 😎 | accel_raw[4];
} struct RawData
{
uint16_t ax, ay, az, gx, gy, gz;
};
... View more