MPU9250 Calibration doesn't converge

Hi everyone,
I'm pretty new to Arduino, I bought a MPU-9250 to track an instrument. I am trying to calibrate it, I modified the code for MPU-6050 that I found here: Calibrating & Optimising the MPU6050 – chillibasket

I am using the library MPU9250-master : GitHub - bolderflight/invensense-imu: Arduino and CMake library for communicating with the InvenSense MPU-6500, MPU-9250 and MPU-9255 nine-axis IMUs.
I am attaching here my code.

Do someone knows what is wrong? There is no error in writing when I compile, It just never reaches convergence. I think maybe the problem is that the library I am using reads the values and corrects them automatically.

If anyone could help, I'd be glad!!!

calibration.ino (4.77 KB)

What made you think that your question has anything to do with the working of this Website and Forum? I have suggested to the Moderator to move it to the Programming section.

This sort of carelessness makes unnecessary work for the Moderators.

...R

Your post gives us no clue what might actually be going wrong. Please read and follow the instructions in the "How to use this forum" post.

You can read about the best way to calibrate the MPU-9250 here and download code to do that here.