💬 Air Humidity Sensor - DHT
-
Hi everybody,
I try to uploaded the sketch on my arduino nano and I have an error with this line :dht.readSensor(true);
When I delete this line I have no error on the upload but the senosr has no refresh...
-
Hi everybody,
I try to uploaded the sketch on my arduino nano and I have an error with this line :dht.readSensor(true);
When I delete this line I have no error on the upload but the senosr has no refresh...
@thomas-schneider
Did you see the comments from Mikael?. Do you have the DHT library?.
What does the error say? -
Yes I saw the comments of Mickael. But sorry, I didn't understand how to download the library. Now all is done and ok ! We need to come back and download the entire folder. Why this library is not in mysensors library ? It's not easy for a newbie.
Thanks for the support and congratulations for the website.
-
-
@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.