B4R Question rDHT confusion

newbie

Member
Licensed User
Longtime User
Hello,
has someone a directly functioning rDHT library ?

i have download and try all versions i have found in the forums,
but nothing works ( with different messages).
I have try the suggestions in the threads but no prosperity.
After more than one hour i am frustrated.

THANKS for any help
 

rbghongade

Active Member
Licensed User
Longtime User
Dear friends,
Tried the above library with DHT22. The output is zero for both temperature and humidity. Using with Wemos d1 mini.
 
Upvote 0

inakigarm

Well-Known Member
Licensed User
Longtime User
Well, I've tested the library and code of https://www.b4x.com/android/forum/t...-and-humidity-sensors-arduino-uno-code.66113/ in:

Arduino UNO + B4R 1.50 and Arduino IDE 1.6.8 ---> OK
Arduino UNO + B4R 1.50 and Arduino IDE 1.6.11 ---> OK

Also, I've tested this lib by Erel (https://www.b4x.com/android/forum/threads/wemos-d1-r2-dht22.68615/#post-435204) on Arduino UNO + B4R+Ard IDE 1.6.11 -->OK

One question though: I've wrapped only the humidity and temperature methods from DHT.h for DHT11 and DHT22 (as you can see at B4R IDE coding) - don't know if there're more methods
I've no ESP8266 to test this lib on it (maybe the right lib for this is this one from Erel https://www.b4x.com/android/forum/threads/wemos-d1-r2-dht22.68615/#post-435204)

DHT11+UNO.gif
 
Upvote 0

Laurent95

Active Member
Licensed User
Longtime User
One question though: I've wrapped only the humidity and temperature methods from DHT.h for DHT11 and DHT22 (as you can see at B4R IDE coding) - don't know if there're more methods
View attachment 50736
Hi,
As far as i know there are only humidity and temperature delivered by dht, not more.
Unless some errors code like 'dht_ReadOk' if i remember well the name of the return (it depends of library also).
And for be honest abandons the dth11, who's really unprecise and who haven't decimales.

Regards.
 
Upvote 0

rwblinn

Well-Known Member
Licensed User
Longtime User
Follow Up Post #16 = Tested successfully the DHT22 connected to a WeMos D1.
Wiring (looking at the white sensor from right to left)
B4X:
DHT22 = ESP8266 WeMOS D1 (Wirecolor)
GND = GND (black)
NC
Signal = D4 (SDA) (white)
VCC = 5v (red)

Output
B4X:
humidity = 62.20 %  temperature =19.50 DegC
humidity = 65.60 %  temperature =20.30 DegC
humidity = 67.30 %  temperature =20.90 DegC
humidity = 67.30 %  temperature =21.30 DegC
Note: used numberformat to set 2 digits on measured values.

Please find the source code attached.
 

Attachments

  • b4rhowtoesp8266dht22.zip
    75.3 KB · Views: 407
Upvote 0
Top