If it's unreliable it could be an issue with pullups on the I2C pins. As I recall sometimes hardware I2C can't use the pullups internal to the chip, so if your MPU6050 board doesn't have pullups on it, it might have problems.
You could try software I2C:
var i2c = new I2C();
i2c.setup({scl:B6, sda:B7, bitrate:100000});
const MPU = require("MPU6050").connect(i2c);
As I believe that can always use pullups, but you could also try adding ~10k-47k pullup resistors to the I2C lines and see if that helps?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
If it's unreliable it could be an issue with pullups on the I2C pins. As I recall sometimes hardware I2C can't use the pullups internal to the chip, so if your MPU6050 board doesn't have pullups on it, it might have problems.
You could try software I2C:
As I believe that can always use pullups, but you could also try adding ~10k-47k pullup resistors to the I2C lines and see if that helps?