• Hello,
    I am trying to get DHT11(temperature and humidity) sensor working with Espruino on ESP32. I get the below output, which as per the documentation means no data is being received.

    {"err":true,"checksumError":false,"raw":­"","temp":-1,"rh":-1}
    

    Code

    var dht = require("DHT11").connect(D17);
    
    function onInit() {
        setInterval(function () {
            dht.read(function (a) {
                console.log(JSON.stringify(a));
            });
        }, 3000);
    }
    
    onInit();
    

    Interestingly, with the same wiring DHT11 works fine using "Arduino core for ESP32". Not sure what I am doing wrong in the Espruino.

    This is the board that I am using https://wiki.wemos.cc/products:lolin32:l­olin32
    Pin out - https://arduino-projekte.info/wp-content­/uploads/2017/07/lolin32_pinout.png

    Thanks in advance.

About

Avatar for Chaapu @Chaapu started