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?
@luwar started
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.
Ooh, it works with the original Espruino board:
Are the boards different related to the power supply or the i2c setup?