You are reading a single comment by @Wilberforce and its replies. Click here to read the full conversation.
  • I've downloaded the firmware above and flashed with that:

    process.env
    ={
      "VERSION": "1v91.374",
      "BUILD_DATE": "Mar  4 2017",
      "BUILD_TIME": "13:37:12",
      "GIT_COMMIT": "5e9489ee5936f24d2684588ff42393b76105cb23",
      "BOARD": "ESP32",
      "CHIP": "ESP32",
      "CHIP_FAMILY": "ESP32",
      "FLASH": 0, "RAM": 524288,
      "SERIAL": "240ac400-2f90",
      "CONSOLE": "Serial1",
      "EXPORTS": { "jsvLock": 1074761212, "jsvLockAgainSafe": 1075125944, "jsvUnLock": 1074763152, "jsvSkipName": 1074778216,
        "jsvMathsOp": 1074787824, "jsvMathsOpSkipNames": 1074791308, "jsvNewFromFloat": 1074773388, "jsvNewFromInteger": 1074773300, "jsvNewFromString": 1074772312,
        "jsvNewFromBool": 1074773360, "jsvGetFloat": 1074782172, "jsvGetInteger": 1074776600, "jsvGetBool": 1074782920, "jspeiFindInScopes": 1074800584,
        "jspReplaceWith": 1074800352, "jspeFunctionCall": 1074809836, "jspGetNamedVariable": 1074802216, "jspGetNamedField": 1074802600, "jspGetVarNamedField": 1074802708,
        "jsvNewWithFlags": 1074772040 }
     }
    

    Using:

    var p;
    if ( process.env.CHIP_FAMILY == 'ESP8266' ) p=NodeMCU.D4;
    else p = D23;
    var ow = new OneWire(p);
    ow.reset();
    var d=require("DS18B20");
    var sensor = d.connect(ow);
    console.log(sensor.getTemp());
    console.log(sensor.getTemp());
    console.log(ow.search());
    

    I have two sensors connected and see:

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v91.374 Copyright 2016 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >24.9375
    24.9375
    [
      "28cc2e230500006b",
      "283260dc04000001"
     ]
    =undefined
    > 
    
About

Avatar for Wilberforce @Wilberforce started