• Ooh, it works with the original Espruino board:

    I2C1.setup( { scl: B6, sda: B7 } );
    function start() {
      I2C1.writeTo( { address: 0x5a, stop: false }, 0x06 );
      var d = I2C1.readFrom( 0x5a, 3 );
      var temp = ((d[1] << 8) + d[0]) * 0.02 - 273.15; // formula from datasheet
       console.log( "Temperature = " + temp + "°C" );
    }
    setTimeout( start, 250 ); // Sensor available 1/4 sec after POR
    

    Are the boards different related to the power supply or the i2c setup?

About

Avatar for luwar @luwar started