Search the Community
Showing results for tags 'overflow'.
-
Hello everyone! I am pretty inexperienced when it comes to computer programming, but I am using the program Jeff posted to use the yaw, pitch, and roll values (I really only need the yaw, though) in a feedback system for a UAV. I am using an Arduino Uno to run the gyroscope, and the program works fine by itself. My issue results from me putting the program on a timer so that it only reads the value every, say, 100 ms. Then FIFO overflow then gets triggered (which makes sense because the values are going in faster than they go out.) Is there any way to bypass this? I noticed one of the past iterations of the program read the values directly instead of from the FIFO buffer, but I didn't understand that version of the program, and I also don't think it had a "ypr" option. Is there an easy way to change the programming, or perhaps a better way to do it? Thanks for any help you can give!
-
Hi everyone, I'm working on a project with an Arduino Teensy 3.2 and the MPU-6050. My method to sample the IMU is based on the "MPU6050_DMP6.ino" example in the library. I modified the program and made it into a function that returns three or four values (angles/accelerations or quaternion), instead of printing them to the serial port. Not much of a change. Anyway - the program works well for a minute or two (sometimes even five). It prints out the angles to the serial monitor and they all seem to make sense. But, after said minute or two (or five) - it all goes to... crap. Instead of "roll 29 pitch 0.1 yaw 1.4" (just an example) I'm suddenly seeing "roll -150 pitch nan yaw 300". Then the outputs go crazy and change values frantically for another minute or so - after which they seem to stop at a certain set of angles (roll -180, pitch 0, yaw -180). And by "stop", I mean they don't change even when I move the MPU around. EDIT: I just noticed that it goes back to normal after a long while. Like after ten minutes, the values would be normal again for one to two minutes. Then it goes mental once more. Does anyone have an idea what the problem might be? I thought it might be FIFO overflow but I don't see any messages in my log. Any help would be greatly appreciated, as always.