Releases: wollewald/MPU9250_WE
Bug in my last release - issue with ESP32
Added functions to reuse autoOffset Data
With getAccOffsets() and getGyrOffsets() you can query the current offsets. If you don't want to perform autoOffset() with every restart, you can write this data back with setAccOffsets() and setGyrOffsets().
Sleep example sketch added
I added MPU9250_sleep.ino to show how to set the MPU9250 and its magnetometer to sleep.
Change in reading the data registers
The functions which read the x, y and z raw values for the three sensors from the data registers had returned the result as an uint64_t. I have changed that. Now the results are "packed" into an uint8_t array with 6 elements. The calling functions pass the array to the reading functions as a pointer.
Separated xyzFloat definition
If you want to use both an MPU9250 and an ICM20948 in one sketch it won't compile because of the double definition of xyzFloat. I have separated xyzFloat. You can delete xyzFloat.h and xyzFloat.cpp in one of the libraries if you use both.
Added a "Who Am I" sketch.
To help users to find out which device they have, I have added a "Who Am I" sketch, which reads the "WhoAmI" register.
README.md update with comments on different MPUxxxx variants
I have updated README.md with comments on different MPUxxxx variants.
Changed pitch calculation
I have changed the pitch angle calculation which is more widely used, e.g. here:
https://wiki.dfrobot.com/How_to_Use_a_Three-Axis_Accelerometer_for_Tilt_Sensing
SPI added
MPU6500 implemented
Due to the great work of @JohannesWilde , the library works now also for the MPU6500.