Jump to content
I2Cdevlib Forums

synthesizer

Members
  • Posts

    2
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by synthesizer

  1. The problem is the delay. Remove any delay from the loop!!!!! You cannot have anything delaying there. Think of it as a bottle being filled with water from a tap: if the bottle is small and u wait 20 seconds, what happens? Overflow Why do you need a delay there? There's a function to disable the FIFO, maybe you can play with it if you really need to stop the reading process and do something meanwhile: void MPU6050::setFIFOEnabled(bool enabled) just remember to enable it when done.
  2. 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
×
×
  • Create New...