gilperon Posted June 23, 2016 Report Share Posted June 23, 2016 Hi, I am pretty sure Jeff's MPU6050 library is the best in the internet to retrieve ypr angles from MPU6050 using the DMP on arduino. It's a really good library but it's not easy to beginners cause the way the basic Arduino code to retrieve ypr from the DMP is a little complicated. Anyway, after spending almost 3 months I am confident I understand very well the code and it works really fine. But I found a problem: sometimes I really need to execute some routine that can take up to 3 to 10 seconds and Jeff's code simply crashes. Sometimes Arduino freezes and no FIFO OVERFLOW error message is displayed, other times the error message is displayed. I know that using DMP relies on interrupt and my code must be really really really optimize in order to not hang arduino for too long. So I decided that before doing my routine I should do mpu.setDMPEnabled(false) and after I finish my routine I should do mpu.setDMPEnabled(true);. But there is a problem: after I execute mpu.setDMPEnabled(true); the MPU6050 restarts its internal "calibration" algorithm and takes at least 5 to 8 seconds to get solid readings to ypr. Doing the method above I can at least prevent fifo overflow or my arduino to freeze, but it creates another problem cause now my new readings (after mpu.setDMPEnabled(true) are not precise anymore for at least 5-8 seconds. Is there someway to ignore DMP readings without overflowing the buffer and at the same time doing something else so in the future I can start to pay "attention" again to DMP and keep reading its angles without any recalibration? lapedNok 1 Quote Link to comment Share on other sites More sharing options...
gilperon Posted June 30, 2016 Author Report Share Posted June 30, 2016 Is this forum up? Nobody looks to answer anything here... 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.