-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPU6050 getting stuck in FIFO Loop #16
Comments
Anyone? |
You may have more luck asking here Here is the description of the function you are using, so if you empty the FIFO buffer it will return 0 and you will be stucked in your while loop.
|
Thank you very much for the link and the info. I will follow this up on the link you provided |
I received a reply on the github pafe you mentioned. However I do not know what to do with it. Here is the reply: "Copied from: MPU6050.cpp line 2744 ~2782" /** Get latest byte from FIFO buffer no matter how much time has passed.
|
Any suggestion on how to fix this? |
I received a message from the jrowberg github regarding this issue. They mentioned the function needs to be added. "ask to see if someone there can add this function. This is the function that they should add." `/** Get latest byte from FIFO buffer no matter how much time has passed.
your alternative is to make this function a local function in your code. this version is not part of the MPU6050 class /** Get the latest byte from FIFO buffer no matter how much time has passed.
` |
Interesting. |
I'm going to review this in a few days |
No progress on this issue. The function works for a while but the data freezes, or stops updating, after a short period. |
Hi @tonyvr4 I have not been able to work on this, for some other projects, if you want to send the solution in a pullrequest it is welcome. We remind you that the support for this library is free and as free software, we do not have a support with time limit, I hope you can understand us |
I really appreciate the update and completely understand the limitations of free support. The reason I updated this issue is because I am working a lot and have limited time at the moment. So I did not want anyone to get upset if it took a bit to reply. I have never done a pull request but will give it a try. Thanks |
It seems that this issue is more involved than I thought. I do not want to abandon the project so I am looking at alternatives. Can I get acceleration from GPS somehow? If not then are there other accelerometer modules that will work ? |
Any updates on this issue? I was ready to wire up a usable version of this project but can not continue due to the I2C freeze issue |
Any updates on this issue? |
I've also experienced this issue and best I can tell it seems to be some sort of overflow that's happening somewhere, perhaps internally with the MPU6050 FIFO buffer. It seems to be related to the rate at which I read the FIFO but writing simplified code slowing down my FIFO reads did not reproduce the issue. In any case, my workaround for now is to slow down the FIFO rate. I can submit a PR to set that rate in DMP initialization. |
@whyameye We welcome your contributions to solve or minimize this problem. |
We will close this issue now. We have made a new release including the FIFO rate changes mentioned by @whyameye (thank you!) in PR #69, so this should be fixed now. Nevertheless, feel free to contact us back if there are any other queries. Enjoy the holidays! 🎄 |
This is based on previously closed issue #13
I have been testing the use of the MPU6050 without interrupt in my GPS-Accelerometer Data logger.
I had to add a line to reset the FIFO before reading the FIFO since it was giving corrupted data.
For some reason it gets stuck in this loop on occasion, I have not determined why. The code was from the DMP6 example
// wait for MPU extra packet(s) available
while (fifoCount < packetSize) {
if (fifoCount < packetSize) {
// try to get out of the infinite loop
Serial.println("In FIFO Loop"); //for troubleshooting
fifoCount = mpu.getFIFOCount();
}
}
The text was updated successfully, but these errors were encountered: