💬 Air Humidity Sensor - DHT
-
-
@skywatch
I know what you mean, I was having the very same trouble with relay actuators, and that's where your solution lies. There is a sketch that allows you to name the number of relays, and then the sketch automatically names the children, you should be able to modify that, (or at least get an idea of how you have multiples of the same sensor on the same board) to add as many dht's as you have spare digital pins on your arduino. Good luck, hours of fun lies ahead ;) -
Is exist some way to calibrate DHT sensors? today i make a experiment assemble 5 nodes with 5 DHT11 sensors put all nodes on one table and leave them for some hours, and the result is the every sensor give different values about temperature and humidity + - MAX 5 degree Celsius around the real temperature in the room. Hardware used Arduino Nano X 5pc., HDT11 X 5pc., the power supply is 12V 2,2A enough to power all of the arduinos.
-
@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 ;)