Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPU6886::calibrateAccelGyro() failure #5

Open
mhaberler opened this issue Apr 17, 2023 · 4 comments
Open

MPU6886::calibrateAccelGyro() failure #5

mhaberler opened this issue Apr 17, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@mhaberler
Copy link

Hi,
trying Calibrated_sensor_output.ino with an esp32 and an MPU6886

MPU6886::calibrateAccelGyro() fails to read back the FIFO sample count here - the readBytes() request is NAK'd, hence fifo_count is zero, resulting in a divide-by-zero here

image

not sure what to do about it, short from replacing gyro calibration with averaging

thanks!
Michael

ps: using Platformio, esp_wrover_kit 4.1 with JTAG, Salea LA
versions are:

Platform espressif32 @ 6.1.0 (required: espressif32)
├── framework-arduinoespressif32 @ 3.20007.0 (required: platformio/framework-arduinoespressif32 @ ~3.20007.0)
├── tool-cmake @ 3.16.4 (required: platformio/tool-cmake @ ~3.16.0)
├── tool-esptoolpy @ 1.40500.0 (required: platformio/tool-esptoolpy @ ~1.40500.0)
├── tool-mkfatfs @ 2.0.1 (required: platformio/tool-mkfatfs @ ~2.0.0)
├── tool-mklittlefs @ 1.203.210628 (required: platformio/tool-mklittlefs @ ~1.203.0)
├── tool-mkspiffs @ 2.230.0 (required: platformio/tool-mkspiffs @ ~2.230.0)
├── tool-ninja @ 1.9.0 (required: platformio/tool-ninja @ ^1.7.0)
├── tool-openocd-esp32 @ 2.1100.20220706 (required: platformio/tool-openocd-esp32 @ ~2.1100.0)
├── toolchain-esp32ulp @ 1.23500.220830 (required: platformio/toolchain-esp32ulp @ ~1.23500.0)
├── toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 (required: espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch5)
└── toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5 (required: espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5)
@LiquidCGS LiquidCGS added the bug Something isn't working label Jun 11, 2023
@LiquidCGS LiquidCGS assigned LiquidCGS and unassigned LiquidCGS Jun 11, 2023
@LiquidCGS
Copy link
Owner

Very late response as I don't get notifications for issues for some reason. it seems like the FIFO_EN bits are set up wrong as they're set up for the 6500's FIFO which is very slightly different, and that's making it not start up the FIFO.

If you disable calibration does it at least output anything?

I'll make a fix soonish, I don't have an mpu6886 to test at the moment.

@bobobo1618
Copy link

I'm having the same problem. When I remove the calibration, I get data but they're extremely noisy.

@LiquidCGS
Copy link
Owner

I'll see if I can get my hands on an MPU6886 again to properly fix that IMU.

@floBik
Copy link
Contributor

floBik commented Jul 4, 2024

Please check if my PR #25 solves this Issue.
It works for me, but I'm not sure if the calibration is working properly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants