Announcement

Collapse
No announcement yet.

NodeMCU and DHT11 API

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • NodeMCU and DHT11 API

    Hi,
    I read several posts about integrating DHT11 on NodeMCU using the board API. It looks like some of those are from the beginning of the plugin which I would need to declare the IP and etc. Now Greig, implements this at the end of his code. Do you have a recent API that you would be able to share with us?

    Thanks,
    Aldo

  • #2
    This thread contains code for the DHT11 implemented in ver 140 of the nodeMCU API sketch.

    https://forums.homeseer.com/showpost...27&postcount=8

    Comment


    • #3
      Thanks Logbuilder, I tried it few weeks back and it did not work. I will try it again and I will submit also a picture of the board, maybe I'm doing something wrong there. Thank you for your help.

      Aldo

      Comment


      • #4
        In the sketch, the DHT11 is on pin 2. If you were running on an UNO, you would connect the DHT11 to physical pin 2. Pins are different on the nodeMCU. Still leaving the sketch at pin 2, you would physically connect to pin D4 on the nodeMCU.

        When you say it didn't work, tell me more. Did you put in some print lines to debug and run serial monitor?

        Comment


        • #5
          Hi Logbuilder,
          Your API worked fantastic, it was an user error, I inverted the pins on the temperature sensor by mistake.

          Thank you very much for your help,
          Aldo

          Comment

          Working...
          X