1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Adafruits Dht library

Discussion in 'Microcontrollers' started by dr pepper, Jun 3, 2017.

  1. dr pepper

    dr pepper Well-Known Member

    Joined:
    Oct 6, 2008
    Messages:
    4,641
    Likes:
    245
    Location:
    North west UK
    Sounds like a simple one but I'm struggling to get this right.
    Using a esp8266 which runs @ at 80m/c's, a couple of sources say that the callibration constant should be 30, as in:
    DHT dht(DHTPIN, DHTTYPE, 30);
    Other sources say 11.
    I've tried various values and cant get the bloomin thing to work right, on a Dht11, 22 and Am2302.
    Has anyone had any experience or success with this, or should I go find another library.
     
  2. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,142
    Likes:
    907
    Location:
    Rochdale UK
    ONLINE
    I was reading through the adarfuit library.
    Also... I struggled here as the esp8266 is a wifi module?
     
  3. dr pepper

    dr pepper Well-Known Member

    Joined:
    Oct 6, 2008
    Messages:
    4,641
    Likes:
    245
    Location:
    North west UK
    Just goes to show, open yer eyes and you'll see.
    Ok so I need to update my dht library, I assumed it was up to date as I keep checking and updating them periodically, they must have changed the name of the lib for the version your suggesting.
    Yep the esp8266 is a wifi module, however the arduino ide has a downloadable compatible compiler for it, so instead of using it the boring way with At commands over serial, you can actually program it directly in C, and for a lot of apps you dont need a second proc, and there are versions such as the esp8266 07 that have plenty of io, and the chip is way more powerfull than an atmega.
    The esp8266 also has spiffs, theres a load of unused memory onboard, and spiffs allows you to use it as though it was a Sd card, nifty if you want to host a html webpage.
     

Share This Page