You are reading a single comment by @ioi-655321 and its replies. Click here to read the full conversation.
  • I'm not sure what the issue is with this module(MPU 6050), but it only works when using the web IDE using Minification; specifically "Closure(online) - Simple Optimizations" , It fails when using Esprima (offline) or any other minification.

    I'm currently trying to use this module on a Pico that was just updated to the latest firmware (2v25)
    I have a working mpu6050 and I can get it to function under these very strict circumstances, but it feels like a kludge.

    I'm just wondering why it would only work under such specific circumstances, is there anything that could be done to make the module more reliable?

    This is not a huge concern but I'm wondering if there are some obvious reasons this module would behave this way.

    I2C1.setup({scl:B6, sda:B7, bitrate:100000});
    const MPU = require("MPU6050").connect(I2C1);
    // 2nd parameter is the fifoRate. The DMP output frequency = 200Hz / (1 + fifoRate)
    const DMP = require("MPU6050_DMP").create(MPU, 1);
    
    function pidLoop(args) {
      if (digitalRead(B5)) {
      var data = DMP.getData();
      if(data !== undefined) console.log(DMP.getYawPitchRoll(data));
    }
    }
    

    I get this error :

    Uncaught SyntaxError: Got '!' expected ','
    at line 1 col 2110
    ...yBank=function(a,bundefined!1,dundefined!1){a&=31,d&&(a|=32)...

About

Avatar for ioi-655321 @ioi-655321 started