InternalError: Timeout on I2C Write BUSY

Posted on
  • Every once in a while I get

    InternalError: Timeout on I2C Write BUSY
    

    on this code:

        var wifi = require("EspruinoWiFi");
        wifi.connect(wifiName, options, function(err) {
            if (err) reject(err); // HERE
            resolve();
        });
    

    Do I simply need to wait then try again?

  • I changed it to this, at least for now:

        const wifi = require("EspruinoWiFi");
        function getIP() {
            wifi.getIP(function(err, info) {
                if (err) setTimeout(getIP, 1000)
                console.log('IP:', info.ip)
            });
        }
        getIP();
    

    Could it be better?

  • It's not just that code that's running if you're getting that error.

    As it says, it's to do with I2C. It happens when you're trying to access an I2C device that isn't connected. I guess somehow you have still got the other code running.

    Are you sure that is all you're uploading?

    If the MPU6050 is still connected then you'll need to check your I2C wiring as well - that could explain a lot.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

InternalError: Timeout on I2C Write BUSY

Posted by Avatar for trusktr @trusktr

Actions