Search the Community
Showing results for tags 'resetfifo'.
synthesizer posted a topic in MPU-6050 6-axis accelerometer/gyroscope (InvenSense)Hi guys, I'm using Jeff Rowberg's code with my MPU-6050, and I managed to get everything working fine except for some YAW drift. I'm aware of the temperature factors as well as the "big shake" causing this drift. That being said, i'm trying to manually reset the sensors (set them to zero) in order to eliminate this drift (let's say, when pressing a button, for simplicity sake). I'm not sure if I should disable the FIFO before resetting the sensor or if that doesn't matter. Not sure if I should reset the FIFO either (I'm using resetSensors) I've tried many combinations but it didn't seem to make a change (if I disable the FIFO, the value jumps to 3.14!?) Resetting the sensors ALWAYS seem to increase the YAW in small increments. So if YAW < 0 then it's "fine" because I can stop resetting when reaching zero. BUT if YAW > 0 it will sum up as well (until it reaches the maximum, jumps to negative and finally reach 0 again). My questions are: - Cannot I reset to zero immediately in one shot (instead of calling resetSensors on the loop until it reaches zero?) Because depending on how far it is from zero, it may take some considerable time to reach it. - If the first question's answer is "no": what can I do to make "resetSensors" sum up when the value is negative and substract when the value is positive? Thank you very much for your help, I really am spending a lot of time on this so I appreciate any feedback! Cheers, Synth