Hello,
my DS18B20 test does reboot device after 36 times of data reading (Espruino v1.89). Test code:
var ow = new OneWire(D14); var sensor = require("DS18B20").connect(ow); var cnt=1; function getTC() { sensor.getTemp(function (temp) { console.log("Temp is "+temp+"°C : ",cnt++); }); setTimeout( function() { getTC(); }, 1000 ); } if(sensor.isPresent()) getTC(); else console.log('no sensor detected');
Console output:
... Temp is 23.25°C : 34 Temp is 23.25°C : 35 Temp is 23.25°C : 36 > ets Jan 8 2013,rst cause:2, boot mode:(3,4) load 0x40100000, len 2408, room 16 tail 8 chksum 0xe5 load 0x3ffe8000, len 776, room 0 tail 8 chksum 0x84 load 0x3ffe8310, len 632, room 0 tail 8 chksum 0xd8 csum 0xd8 2nd boot version : 1.6 SPI Speed : 80MHz SPI Mode : QIO SPI Flash Size & Map: 32Mbit(512KB+512KB) jump to run user1 @ 1000 Disconnected
The call of sensor.getTemp() without callback a little extends the live time.
Thank you in the advance!
@MSol 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.
Hello,
my DS18B20 test does reboot device after 36 times of data reading (Espruino v1.89). Test code:
Console output:
The call of sensor.getTemp() without callback a little extends the live time.
Thank you in the advance!