• Here's the code I'm using btw (the same as in the docs, just the I2C options and trigger changed)

    I2C1.setup({scl:A5, sda:A4});
    
    const MPU = require("MPU6050").connect(I2C1);
    // 2nd parameter is the fifoRate. The DMP output frequency = 200Hz / (1 + fifoRate)
    const DMP = require("https://raw.githubusercontent.c­om/espruino/EspruinoDocs/master/devices/­MPU6050_DMP.js").create(MPU, 3);
    
    function pidLoop(args) {
      var data = DMP.getData();
      if(data !== undefined) console.log(DMP.getYawPitchRoll(data));
    }
    
    setWatch(pidLoop, D13, { repeat:true, edge:'rising' });
    
About

Avatar for parasquid @parasquid started