You are reading a single comment by @hygy and its replies. Click here to read the full conversation.
  • So it works the first time, but not subsequent ones?

    What about the old version, which is:

    var dht = require("https://raw.githubusercontent.com/espruino/EspruinoDocs/f884681b9b1d76dc8685249afac6f2b4ce2a1542/devices/DHT22.js").connect(pin);
    
  • This is what I get from this old version:

    >reset();
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v85.tve_master_cee7141 Copyright 2016 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
    >echo(0);
    =undefined
    { "temp": 25.2, "rh": 46.1 }
    Temp is 25.2 and RH is 46.1
    { "temp": 25.2, "rh": 48.4 }
    Temp is 25.2 and RH is 48.4
    { "temp": 25.2, "rh": 48 }
    Temp is 25.2 and RH is 48
    { "temp": 25.2, "rh": 49.9 }
    Temp is 25.2 and RH is 49.9
    { "temp": 25.3, "rh": 49.9 }
    Temp is 25.3 and RH is 49.9
    { "temp": 25.3, "rh": 50 }
    Temp is 25.3 and RH is 50
    { "temp": 25.3, "rh": 49.8 }
    Temp is 25.3 and RH is 49.8
    { "temp": 25.3, "rh": 49 }
    Temp is 25.3 and RH is 49
    { "temp": 25.3, "rh": 48.5 }
    Temp is 25.3 and RH is 48.5
    >clearInterval()
    =undefined
    

    Dont know when it works with the new. If I plug and unplug about every second, some times, it write out some negativ values, but the other part is just no data.

About

Avatar for hygy @hygy started