Search the Community
Showing results for tags 'Hangs'.
-
Hey everyone! I've got my MPU6050 hooked-up to my Arduino UNO and have the DMP sketch running just find and dandy, sometimes... At times, the code will hang at "Initializing I2C devices..."; at other times it runs as expected. I'm having a hard time recreating the error; I don't think it's a hardware thing (loose wires perhaps since I'm still breadboarding) because I've got it sitting on my desk and without touching it the error comes up & then goes away with a simple re-compile of the sketch. I've put some print statements in the initialize() function to see which sub-function might be causing the issue and I've narrowed it down to setClockSource() Has anyone else experienced this or is this just on my end? Thanks!
-
Hello! I am kindly asking for help with my small question: I am writing some algorithm, which must work one time in one loop iteration. It takes him ~ 5-7 msec to proceed every loop(). I noticed, that my program hangs sometimes. Very rarely: ~ after 10 - 30 minutes of working. Than I went to DMP example, added delay(6) at the end of a loop.... And the same result: sometimes it hangs (after 10 - 30 minutes of working). I added Serial.println in the loop, where the program waits for interrupt, because it is the only one loop. Like this: while (!mpuInterrupt && fifoCount < packetSize) { Serial.println("Waiting..."); } And there is no "Waiting..." messages, when it hangs. Here is a full code of "my" MPU DMP example. It is the same as standart exampe, except two of three lines. I also added the loop period counting and printed it with YPR data. Also I tried it with two different MPU-6050... Sory for my English :-)