-
• #2
Ok, thanks for giving that a go. It's difficult to track down without having an MPU6050 here (it's a contributed module).
If you uncomment the
console.log
, how quickly is it being called?It'd be interesting if you could compare
getTime
before and after the call indmpLoop
, to see if the function call is actually taking the majority of the time or not.If you're able to change the module yourself, I think the while loop in this line: https://github.com/espruino/EspruinoDocs/blob/master/devices/MPU6050_DMP.js#L121
should be removed, and the check moved into the
if
statement above.My hunch is that the interrupt line is maybe getting pulled low for reasons other than the FIFO having data, and that's causing it to enter the
getData
function and then get stuck polling for more data. -
• #3
Just quickly:
- Are you sure B5 is connected correctly to the IRQ pin? If it was floating it could cause all kinds of issues.
- Are there I2C pullup resistors somewhere in the circuit? I think it's unlikely but if there were a bad I2c connection it could really slow things down and stall the idle loop
- Are you sure B5 is connected correctly to the IRQ pin? If it was floating it could cause all kinds of issues.
Continuing from https://github.com/espruino/EspruinoDocs/issues/367#issuecomment-306120068,
I tried the
"falling"
edge suggestion, but the behavior seems the same, the HTTP server never responds, and I never see the------ dmpYawPitchRoll
output in Espruino console.Here's the code I'm trying:
Making an HTTP request from the computer to Espruino doesn't work. If you uncomment the
console.log
calls, thesetWatch
loop is working, and I will see that output repeatedly in console.