Releases: wollewald/MPU9250_WE
Improved efficiency of FIFO read
FIFO was read byte by byte, each with a separate wire.beginTransmission. Now a complete x,y,z triple (6 bytes) is read in one go.
I also removed one redundant function and did some "clean up".
Bug Fix in getGyrValuesFromFifo()
The offsets had not been considered when reading the gyroscope values from the FIFO. I have changed that.
Read performance increase
In the readRegister functions, I have added a "false" in Wire.endTransmission() ---> Wire.endTransmission(false) before Wire.requestFrom(). This saves some microseconds.
Correction of a variable type conversion
In the readMPU9250xyzValFromFifo the conversion of the bytes read from FIFO and their conversion into floats was not clean and seemded to not work with some compilers.
Changed implementation of magnetometer
The way I implemented the magnetometer in previous versions did not work for all modules. Magnetometer data is now retrieved via the I2C Master of the MPU9250.
TwoWire object can now be passed to the constructor
There are now several ways to create your MPU9250 object:
- MPU9250_WE myMPU9250 = MPU9250_WE() -> uses Wire / I2C Address = 0x68
- MPU9250_WE myMPU9250 = MPU9250_WE(MPU9250_ADDR) -> uses Wire / MPU9250_ADDR
- MPU9250_WE myMPU9250 = MPU9250_WE(&wire2) -> uses the TwoWire object wire2 / MPU9250_ADDR
- MPU9250_WE myMPU9250 = MPU9250_WE(&wire2, MPU9250_ADDR) -> all together
So you are now able two use the two I2C busses of an ESP32.
Fixed bug in setIntPinPolarity()
Fixed bug in setIntPinPolarity(): setting of interrupt pin polarity might have led to other, unwanted changes in register INT_PIN_CFG.
Fixed bug in getPitch
getPitch() provided nder certain conditions nan (not a number). The reason was a square root operation within the function where negative values could go in. Change it to absolute values.
Moreover I still found typos in the comments of the example sketch.
Documentation available
Documentation is available on my website:
https://wolles-elektronikkiste.de/mpu9250-9-achsen-sensormodul-teil-1 (German)
https://wolles-elektronikkiste.de/en/mpu9250-9-axis-sensor-module-part-1 (English)
Correction of some further typos in comments
- corrected some further typos
- in 1.0.1 I forgot to update the version number in library.properties