You are reading a single comment by @Wilberforce and its replies. Click here to read the full conversation.
  • 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 }
    
About

Avatar for Wilberforce @Wilberforce started