Been doing some experiments with a DS18B20 sensor on an Espruino WiFi, I've had a couple of successful reads but mostly I'm getting this error:
(Sorry for the screenshot I can't figure out how to copy/paste from the console!
My code is just this for now:
var ow = new OneWire(A0);
var sensor = require("DS18B20").connect(ow);
function read(){
sensor.getTemp(function (temp) {
console.log("Temp is "+temp+"°C");
});
}
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.
Been doing some experiments with a DS18B20 sensor on an Espruino WiFi, I've had a couple of successful reads but mostly I'm getting this error:
(Sorry for the screenshot I can't figure out how to copy/paste from the console!
My code is just this for now:
1 Attachment