Jump to content
I2Cdevlib Forums

Jeff Rowberg library: how to obtain angles without buffer

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...




long running code...




Also, is there someway I can discover if the buffer is getting full?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...