💬 Air Humidity Sensor - DHT
-
@tiana well you could simply calibrate the value you get in your sketch for every DHT on it's own. But you have to do a calibraton, meaning measure all of them at multiple temperatures and humidities.
If it's only a offset you can also use// Set this offset if the sensor has a permanent small offset to the real temperatures #define SENSOR_TEMP_OFFSET 0to correct for this, otherwise you have to implement your calibration function on your own.
-
I read datasheet for DHT11 and 2 degree deviation is ok for them. Now i playing with DHT22 I try this #define SENSOR_TEMP_OFFSET -1.3, but nothing is changed the sensor still give me same value.
-
Using library linked above
Getting: no matching function for call to 'DHT::readSensor(bool)' -
This thread contains comments for the article "Air Humidity Sensor - DHT" posted on MySensors.org.
@hek
hi, how do I change the readings from C to F?
My sensor works fine, by I get the readings I celsius -
@hek
hi, how do I change the readings from C to F?
My sensor works fine, by I get the readings I celsius@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.
-
@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.