Conversation
|
Wow this looks really neat. Thanks! Before I merge this I want to take a closer look at the code, which I'll do in a few days. |
|
Feel free to change or make suggestions. The progress 'print' is for python 3. Could be eliminated or made more flexible to accommodate 2.7 (line 280). |
|
Did you test it with python3? As far as I know the python-smbus is not compatible with any python version higher than 2.7.x. |
|
I actually only used it on Python 3.5. Didn't test on 2.7. One potential issue is that my print statement for the 'progress' on line 280 is python 3 specific. Your package is being used on donkey car which is python 3 / raspberry pi oriented. I'll take a look at smbus specifically this weekend |
|
Oh that's pretty interesting. I haven't used my module for a while, but last time I did the |
|
Hey, I currently don't have any working MPU-6050s on hand (I fried my last working one) to test it, so I'm afraid it will have to wait for some time. |
If I understand your code correctly, you calculate the mean of ~200 readings for each sensor axis, to then subtract the value from a scaled reading in get_accel/get_gyro, correct? This simply removes any bias/drift we observe in a still environment? |
|
I wrote similar version to calibrate. |

Performs a software calibration of the 6050 to zero it out. Could possibly be extended to write the calibrations to the 6050 registers with a bit of rework.