Now with this code works to get a realtime 24-bit value without re-upload:
var i2c = new I2C();
i2c.setup({ scl : D29, sda: D28 });
setInterval(() => {
i2c.writeTo(0x18, 0xAA, 0x00, 0x00);
setTimeout(() => {
let a = i2c.readFrom(MPRL, 5);
console.log(a);
}, 100);
}, 300);
Now I try to calculate the pressure like in the description of the datasheet and the arduino library.
Its strange I just played with the new code and the times of the timeout and interval function.
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.
Hi Robin,
also thanks for your answer.
Now with this code works to get a realtime 24-bit value without re-upload:
Now I try to calculate the pressure like in the description of the datasheet and the arduino library.
Its strange I just played with the new code and the times of the timeout and interval function.