How to debug idDHTLib?

28 Jan 2014

Hi, I have just published my test code http://mbed.org/users/Njbuch/code/NewDHT11Test/

This code uses the idDHTLib but the output is not right. Kamil (author of idDHTLib) thinks there might be a problem with a pull-up resistor but I dont have a clue... I think there is missing some bits.

The old DHTLib often resulted in checksum error, and I have not been able to find the error in this one as well.

Output from test-program (endless loop)

Status is 0
Temperature is -3.00 C
Humidity is -3.00
Status is 0
Temperature is -3.00 C
Humidity is -3.00

Do you have any ideas what can be wrong here?

28 Jan 2014

Niels,

This may help. At least you know the history reading from the DHT devices.

http://mbed.org/questions/623/DHT11-checksum-error/

...kevin

29 Jan 2014

Thanks Kevin, I have actually been trying to grasp you post from that thread, without luck. I still think there is an error somewhere, and now the question is: where?

29 Jan 2014

Since only odd returned numbers from the DHT generate checksum errors (23, 25, 27, etc) and even returned numbers do not, I spent a little time looking at the code. From what I could tell, the very first bit read from the DHT gets missed. I thought I could see where the the driver's author then shifted the data by one bit to try to compensate for the missed bit. I could be wrong, but that's what I thought I saw.

...kevin