Hi, I am using the ICM20948 9DoF motion sensor breakout on my Pi2Go-Mk2 robot and I would like to be able to correct the rotation axis of the gyroscope. I think I should be able to use the accelerometer data of it to do that. As the 🤖 robot is a cart, which is always plane (or how do you say that?, in the same horizontal level on 2 wheels and a ball), I get fixed readings for the accelerometer: X = 1.00 Y = 0.05 Z= 0.00 (stationary, of course).
I could be lazy and try to adjust the breakout (using an extender) so the Y-reading is also 0.00 , but how would I do this in Python code? My aim is to have the robot make rotations in degrees ° as exactly as possible. It is pretty accurate already, but if I make a few 90° rotations, I can see that there is a deviation. I think this is because of the orientation.
🤖 Any help or ideas are much appreciated! 👍