• Solved the reset and external clock problem
    Reset

    The reset requires a delay after the command is issued.
    This was solved by using a callback structure in the module

    exports.connect = function(i2c,BusAddress,callback) {
      var W= new BNO055(i2c,BusAddress);
      W.RST_SYS();
    setTimeout(function () {
       callback();
    }, 1000);
       return W;
    };
    

    Which changes the code in the test program.

    //load the BMO055 module  
     W=require("BNO055").connect(I2C3,BusAddr­ess,function(){
    ///lots of code here in the callback
    });//end require
    
    External Clock

    The call to change the clock souce also requires a delay which is addressed using a callback function
    In the module:

    BNO055.prototype.External_Clk=function(a­,callback){
     this.selectPage(0);
     if(a)
     this.WriteByte(this.Page0Regs.SYS_TRIGGE­R,0x80);
     else
     this.WriteByte(this.Page0Regs.SYS_TRIGGE­R,0x00);
    setTimeout(function () {
       callback();
    }, 50);
    };
    

    The code in the test program:

    //load the BMO055 module  
     W=require("BNO055").connect(I2C3,BusAddr­ess,function(){
    W.External_Clk(1,function(){ //1=external 0=internal clock
    //Lots of code
    //do a timed loop that acquires and displays data
    var i;
    setInterval(function () {
    console.log(" ");
    showAMG();
    showIMU();
    showTemp();
    showCalibStatus();
    showOffsets();
    
    }, 500);//display rate
    });//end set external clock 
     });//end require
    }//end start
    

    2 Attachments

About