Hi Rongzhong
I love my robot, just afraid it has an MPU issue
Finished assembling my Nybble, then uploaded WriteInstinct.ino. At the MPU6050 calibration step, it connects successfully to the chip, but then I can see rows of numbers displaying in a loop and no end. All numbers are 0 except the 3rd one that makes sort of a cycle ( 0 => big number => negatives => 0,...)
Video here:
Last time I tried it lasted 45mn before I abort.
My Nyboard is V0_2, and testMPU does not finish also. I get stuck on:
Wait for first interrupt
😥
Ok, I understand. Please write to support@petoi.com and provide your address for a replacement. It will be very helpful if you could return the old one for diagnose, but it's all up to you. Sorry for the inconvenience.
After displaying "DMP ready! Waiting for first interrupt..." I get nothing. I don't know if there is a debug mode but it seems it's in an infinite loop in:
while (!mpuInterrupt && fifoCount < packetSize)
The reset is a tiny switch right? I tried to play with this switch and when up, the program don't execute and I get 3 unreadable lines of text. If I switch on and off when while "DMP ready! Waiting for first interrupt..." is displayed, nothing happens on the screen.
Do you mean that the DMP of MPU6050 is connected but there's no reading from the sensor, according to the testMPU.ino code? What if you press the reset button on the NyBoard a few times?
Thank you for responding so fast. Yes the connection is successful at calibration step.
When running TestMPU I get this:
By the way I changed the code: Serial.begin(115200) by Serial.begin(57600). Working with the branch main instead of master.
Before entering the calibration loop, do you see a connection succeeded/failed message from this piece of code in WriteInstinct.h?
PTL(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed (sometimes it shows \"failed\" but is ok to bypass."));
There's a testMPU.ino in ModuleTest folder https://github.com/PetoiCamp/OpenCat/tree/main/ModuleTests/testMPU
Could you run it and report what is printed on the serial monitor? It should print angles as below:
Yes the switch is on Ard. I passed successfully the TestUltrasound, TestInfrared and TestBuzzer. And I can calibrate the servos. Everything works fine except the MPU.
Hi, could you check the I2C switch (SW2) on the NyBoard? Is it dialed to Ard or Pi? It should be on Ard.