Closed nailgilaziev closed 6 years ago
who can give advice in which direction should I look for a problem?
I had similar problems, but with DHT11 (https://github.com/t-w/SimpleDHT/issues/2). After having look inside the library and playing for a while, I found out that there are timing issues while accessing the device (the times I measured do not match exactly those implemented or specified in documentation). I managed to patch the library so that it works properly on my Mega2560, you can find it here: https://github.com/t-w/SimpleDHT/tree/mega2560_r3 It would require testing on other devices though, before eventually merging (I already had to correct one time threshold to works also on ESP8266, available in provided repo, the esp2866 branch).
For the DHT22, I suppose the problems are similar. You would need to have a closer look at the SimpleDHT22:sample(), where the timing problems occur... I do not have DHT22 so cannot test it myself.
👍 Please file a MergeRequest.
I will test it on Arduino with DHT11 and DHT22.
@t-w Your fork works perfectly for me! Prior to it, with my MEGA2560, I was getting 95 read errors out of 100 (not an exaggeration); now, it's perfect.
@winlinvip, any chance of getting this merged in? Pretty please? If only because I experienced what my 10yo's reaction was when the DHT11 in our kit "wasn't working at all" — leading me to hunt and figure out what might be happening, and finding this.
I need to test it on Arduino UNO R3.
Please test 1.0.9
HI! Thanks for this great library!
I want to report a strange behavior on mega2560. Same dht22, VCC 5v, same pullUP 10K resistor, same wires, same Pin on board.
attempt №1 , I connect it to my Arduino Nano and run example sketch: Arduino Nano (Atmega 328P)
Success rate 100% after 100 iterates.
Attempt №2, I connect it to my Arduino Mega Pro and run same sketch: Arduino Mega Pro (Atmega2560 / 12MHz)
attempt №3 Arduino Mega (Atmega 2560 / 16MHz)
On both mega2560 error with code 105 occur. (checksum) What can be a problem?