Hey all, I’m brand new here and I thought I would see if any of you guys can shed any light on this subject.
I hope I have posted in the correct place, if not please do let me know.
I am working on an object avoidance robot with an ultrasonic sensor for distance measurements and an inertial measurement unit to determine the orientation of the robot.
Basically I have tried a number of different MPU6050 libraries and quite a few examples as well as watching a number of tutorial videos on YouTube but I still don’t really understand what is going on.
As far as I understand it, reading data from the MPU6050 and translating that into angles etc. is dependant on the time it takes for the loop to run. If I add a delay to the loop, the readings are affected and with a 1 second delay, they are so far off its as if it’s not moving anymore.
My questions is, why does the time it takes for a loop to complete effect the data produced by the MPU6050?
I can add my code if needed but this is a pretty broad question and I’m not sure it matter what code you use (at least as far as I can tell).