tuupola / micropython-mpu9250

MicroPython I2C driver for MPU9250 9-axis motion tracking device
MIT License
141 stars 47 forks source link

Whoami validation #31

Open LubosKuzma opened 6 months ago

LubosKuzma commented 6 months ago

whoami responses vary from item to item, but seem to be tied to specific item. I have multiple MPU6500 as well as MPU9250s and neither worked with the current whoami validation process.

I updated both the ak8963.py and mpu6500.py to include argument where users can define whoami response. Also added suggestion inside Runtime Error to indicate what the whoami response is.

Zenodeon commented 3 months ago

Lifesaver PR ❤️

and for others After finding and fixing the correct address in mpu6500.py using the PR Code, we found that ak8963.py was giving OSError: [Errno 19] ENODEV error at line 200, we fixed it by changing the ak8963.py self, i2c, address=0x0c, to self, i2c, address=0x68, which then fixed the error and helped find the correct address for the ak8963.py using the PR Code.