gilperon Posted January 29, 2015 Report Share Posted January 29, 2015 Hi everyone, I am using in the last months the really nice library provided by Jeff which is A M A Z I N G. Thank you man I am using it in my quadcopter and works really nice (thank you again). But there is a problem: I dont like the idea of using sensor fusion cause it is too complicated to setup with arduino and also uses too much proccessing power from my arduino. That's why I am using the DMP angle values from the MPU6050. The problem is this, after days trying to find a solution: I would like someway to obtain angles from MPU6050 DMP calling a function "get_angles()" not using interrupt pin or the buffer. The reason is that I make many other computation in arduino and frequently the buffer of MPU6050 overflows and my quad get out of control and fall. I already reduced the frequency that the buffer gets populated to the minimum but I still sometimes get overflows. That's why I would like to know if there is some way I could retrieve angles from MPU6050 using a function exactly like "mpu.getMotion6" but with angles, not with giro and accel data. Thank you so much, you helped me a lot with this great and very well documented library. Ekbergdub 1 Quote Link to comment Share on other sites More sharing options...
luisrodenas Posted February 3, 2015 Report Share Posted February 3, 2015 Hello gilperon, There is no way of getting DMP angles without fifo buffer, but if I am not mistaken there was a way of just leaving angles and removing giro and accel data from buffer... Anyway, I think the easiest way is to make your arduino read that buffer and use or discard data, but read it. It takes very little time if you are using fast I2C. By the way, you should use gyro data as well to control your quadcopter. Sorry I can't be of more help. Good luck Quote Link to comment Share on other sites More sharing options...
gilperon Posted February 4, 2015 Author Report Share Posted February 4, 2015 Thank you so much luisrodenas! I agree, probably there is no way to get angles without DMP. I will have to live with that But I would like to ask you one question: do you know how to force a read in the buffer? For example, if I have a function that I know is very slow, how can I force a few readings from the sensor during my function execution? Is there some way to do this: long running code... readDmp(); readDmp(); readDmp(); long running code... ? Also, is there someway I can discover if the buffer is getting full? Quote Link to comment Share on other sites More sharing options...
cgng Posted February 6, 2015 Report Share Posted February 6, 2015 Hello gilperon, When the buffer is full, reading the mpuIntStatus & 0x10 will return true. And to read the FIFO buffer, use the getFIFOBytes function. Quote Link to comment Share on other sites More sharing options...
gilperon Posted February 6, 2015 Author Report Share Posted February 6, 2015 Thank you so much! My problem is that smoetimes my arduino freezes and I need to restart it but there is no FIFO OVERFLOW message in the serial. Maybe JEFF R. library is not reseting the fifo when it should and causing my arduino to freeze? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.