FaBoPlatform / FaBo9AXIS-MPU9250-Python

Apache License 2.0
49 stars 39 forks source link

python3 compatible version #2

Open fishworx opened 5 years ago

fishworx commented 5 years ago

Works on python2, how can we make it python3 compatible?

jirmauritz commented 3 years ago

There is already fork for that: https://pypi.org/project/FaBo9Axis-MPU9250-Python3/

hackebike commented 3 years ago

getting the following error both with old and new version, any ideas?

File "read9axis.py", line 18, in <module> mpu9250 = FaBo9Axis_MPU9250.MPU9250() File "/usr/local/lib/python3.7/dist-packages/FaBo9Axis_MPU9250/MPU9250.py", line 104, in __init__ self.configAK8963(AK8963_MODE_C8HZ, AK8963_BIT_16) File "/usr/local/lib/python3.7/dist-packages/FaBo9Axis_MPU9250/MPU9250.py", line 170, in configAK8963 bus.write_byte_data(AK8963_SLAVE_ADDRESS, AK8963_CNTL1, 0x00) OSError: [Errno 121] Remote I/O error

hackebike commented 3 years ago

I can detect the sensor:

$ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- 0c -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- 76 --

brisbaneroboticsclub commented 3 years ago

Maybe this can help???

http://brisbaneroboticsclub.id.au/install-keystudio-i2c-shield-v1/

hackebike commented 3 years ago

thx will look into it !

jirmauritz commented 3 years ago

I was getting OSError: [Errno 121] Remote I/O error everytime I moved the jumper contacts a bit in the sensor. It is very sensitive in terms of contact areas. I doubt this error is problem of the library.