• I'm getting very random results using DS18B20 one wire probes on two MDBT42Q boards. I'm using the latest firmware (as of March 2) but even simple searches for probes turns up unreliable results.
    I'm using pin D11, have two DS18B20 probes that I've used reliably with other hardware (not Espruino), the probes' VDD pin is hard wired to VDD and I have a 4.7K pullup resistor.

    Here is the code:

    var ds = new OneWire(D11);
    var sensors;
    digitalWrite(D3,0);
    function searchFor() {
      digitalWrite(D3,1);     // pulse trigger
      ds.reset();
      digitalWrite(D3,0);     // pulse trigger
      sensors = ds.search();
    
    if (sensors.length >= 1) {
      console.log("Found "+sensors.length+" probes!");
      console.log(sensors);
      
    } else
      console.log("No One Wire probes found!");
    } 
    
    setInterval(searchFor, 20000);   // search every 20 seconds
    

    Attached is a snap of the IDE output.


    1 Attachment

    • OneWireSearchBreakout.JPG
About

Avatar for TomWS @TomWS started