You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ok, I've just updated the module. Please could someone try:

    var t = require("https://raw.githubusercontent.com/espruino/EspruinoDocs/master/devices/DS18B20.js").connect(new OneWire(A1));
    t.getTemp(console.log);
    

    And see if it works on DS18S20 as well?

    I hopefully tidied it up a lot so it uses OneWire a bit more efficiently. It also checks the CRC now, so verify isn't needed and has been removed - the minified code is a smidge smaller too.

    Personally I'd be tempted to remove isPresent, since a call to getTemp will just return null now.

About

Avatar for Gordon @Gordon started