or not ;-(
After re-powering the board, the sensors reverted to the 85C state:
"search": [ "28cc2e230500006b", "283260dc04000001" ] } initial: 85 initial: 85 =undefined 0: undefined 1: undefined { "cb_temp": 26.3125 }
I guess if you executed other code before the first actual call to getTemp() this would work out ok....
By setting the mode to 9 bit so the conversion is shorter:
var sensors = s.map(function (device) { var t=ds.connect(ow, device); t.setRes(9); t.getTemp(); t.setRes(12); return t; });
{ "search": [ "28cc2e230500006b", "283260dc04000001" ] } initial: 25.4375 initial: 24.0625 =undefined 0: undefined 1: undefined { "cb_temp": 25.875 } { "cb_temp": 24.9375 }
@Wilberforce 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.
or not ;-(
After re-powering the board, the sensors reverted to the 85C state:
I guess if you executed other code before the first actual call to getTemp() this would work out ok....
By setting the mode to 9 bit so the conversion is shorter: