Jump to content
I2Cdevlib Forums

Slow DMP reading with an Arduino Due


Recommended Posts

Hello everybody,

First of all, thanks a lot for the Library, this saved me a lot of precious time!

 

I'm here to ask for a little help :

I'm using an Arduino Due (using arduino 1.5.5-r2 software) to read the data from my MPU6050, using the DMP. I read the angles using the same code as in the example code for the DMP and I tried a lot of different configurations, without any change.

I noticed that reading the values takes my approximately 6ms. This is a little bit long for me, but the interesting thing is that the sketch spends 5ms of the 6 in the call of this function:

// read a packet from FIFO
mpu.getFIFOBytes(fifoBuffer, packetSize);

I don't understand how this can be so long. This is just reading registers and the packetSize is only 42...

 

So here are my questions. Is this normal with an MPU6050 or is there effectively something strange ? Does anybody have any idea why this is happening? When this function is called, the data should be ready, so why do I loose so much time ?

 

 

I hope somebody will be able to help me with this, because otherwise I'll have to read the raw data and process them by myself. So thanks in advance for your answers!

Link to comment
Share on other sites

Hello, tanks for your answer. That was the problem. I tried several ways to change the speed, but in fact none of them was really working (as I'm using a Due it is different)... So I had to modify a define in the Wire library in the folder sam of hardware. So the problem is now solved,thanks!

But is there a solution I could put in the code, instead of modifying the library? And this would be useful to update the examples in the library to work properly with an arduino Due.

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

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

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

Loading...
×
×
  • Create New...