💬 Air Humidity Sensor - DHT
-
@ramoncarranza
Change the line in the sketch:temperature = dht.toFahrenheit(temperature);
to
temperature = dht.toCelsius(temperature);
probably? I haven't checked it, just looked at the DHT library. You may need to comment the isMetric line earlier in the sketch too. But I think that's how you do it.
@mikeS Thanks so much for your reply, it's working perfectly now.
-
@Jim Danforth
Getting the same, have tried a number of different DHT libraries and cant get it to compile. -
@meanmrgreen The only DHT library that will work is the one from the link before the sketch. If you have used others chances are you need to move or rename those other DHT libraries as that is why the sketch cannot call that function.
-
@meanmrgreen The only DHT library that will work is the one from the link before the sketch. If you have used others chances are you need to move or rename those other DHT libraries as that is why the sketch cannot call that function.
Ive tried to reinstall and start från scratch but i guess i Missed something.
-
@meanmrgreen sometimes windows puts libraries in your documents folder, so they may be located in 2 or more places. Use windows search to find them all. I have 3 DHT libraries, the mysensors one, the adafruit(I think) and another that came with an MQTT based sketch for an ESP board. I just rename them. Incidentally the mysensors DHT library gives me the most accurate results, as much as 2 degrees and 10% out on the same sensor using a different library.
Also don't update the DHT library if you are told there is an update!
As you can tell I had a few problems myself before I got this working, it almost made me disregard the whole project. Keep trying , it's worth it. -
@meanmrgreen sometimes windows puts libraries in your documents folder, so they may be located in 2 or more places. Use windows search to find them all. I have 3 DHT libraries, the mysensors one, the adafruit(I think) and another that came with an MQTT based sketch for an ESP board. I just rename them. Incidentally the mysensors DHT library gives me the most accurate results, as much as 2 degrees and 10% out on the same sensor using a different library.
Also don't update the DHT library if you are told there is an update!
As you can tell I had a few problems myself before I got this working, it almost made me disregard the whole project. Keep trying , it's worth it.@mikeS thanks alot!
I'll keep that in mind. Should be getting my "starter kit" order soon from eBay so we'll see how it goes ;) -
Finaly got it to compile.
I tried the library link above but no go, cleared out everything about ardouino on the pc, no go.I finaly stubled onto this:
https://github.com/mysensors/MySensorsArduinoExamples
Downloaded all the expample libraries, loaded the scetch and it worked!Something is up with the linked library on this page i think
-
Finaly got it to compile.
I tried the library link above but no go, cleared out everything about ardouino on the pc, no go.I finaly stubled onto this:
https://github.com/mysensors/MySensorsArduinoExamples
Downloaded all the expample libraries, loaded the scetch and it worked!Something is up with the linked library on this page i think
@meanmrgreen the link pointed to a folder on GitHub. If that folder is downloaded, you get the MySensorsExamples. But in that folder, there is also a link to the original DHT library. If that link is followed, the wrong library will be downloaded.
Several people have been bitten by this so I have now changed the link to point directly to the MySensorsExamples zip file.
-
In Wiring Things Up and screen are used DATA_PIN 3, but in example is wrote #define DHT_DATA_PIN 2 :-) ...please correct it.
-
This thread contains comments for the article "Air Humidity Sensor - DHT" posted on MySensors.org.
@hek how do I change fro C to F?
-
@hek how do I change fro C to F?
-
Yes, didn't see that one @mfalkvidd. Hmm.. Not sure I have the source photoshop psd available any more.
-
What @Skywatch meant was that "#define DHT_DATA_PIN 2" is STILL in the example code on this page. Anyone who even gets as far as working it all out and wiring it all up and it still it won't work like that! - Not when it needs to be connected to PIN 3 instead (esp if the NRF is using pin 2, which is likely).
Happy New Year to you all! :) -
Just a note, tried following this for adding a DHT11 to the ESP8266 MQTT gateway. The MySensors example lib does not work with esp8266 (temperatures around 17000+). However the adafruit DHT library 1.3.0 works just fine.Any reason that couldn't be used here?