Jump to content
I2Cdevlib Forums

Leaderboard

Popular Content

Showing content with the highest reputation on 08/27/2016 in all areas

  1. gilperon

    MPU6050 pausing it

    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?
    1 point
  2. Hi guys, I'm interfacing the mpu6050 with Tiva C arm cortex m4 basesd launchpad "TM4C123GH6PM" I setup up the configuration of the IMU and when I ran I got a weird behavior from PITCH and ROLL readings. The vales should always read zero when leveled up.. but after every 4 or 5 outputs they go high. Roll : 82.890320 Pitch : 44.777519 Roll : 0.119266 Pitch : 82.930687 Roll : 0.070139 Pitch : 82.928864 Roll : 82.983780 Pitch : 44.805222 Roll : 0.049558 Pitch : 0.063718 Roll : 82.967545 Pitch : 0.014765 Roll : 82.964287 Pitch : 44.801392 Roll : 0.035360 Pitch : 82.988754 Roll : 0.035095 Pitch : 82.937157 Roll : 0.042208 Pitch : 82.950836 Roll : 0.161359 Pitch : 0.014031 Roll : 82.955894 Pitch : 0.002605 Roll : 0.021050 Pitch : 82.933815
    1 point
×
×
  • Create New...