[LIB] Interrupt driven DHTLib (DHT11 & DHT22 = idDHTLib)

With delta > 100 I seem to be receiving entirely correct data:

So it looks like everything is good now? Please check it over just to be sure :smiley:

Edit: it's also working perfectly in my 'big' app where I switched over to the interrupt version of the lib initially, it has LCD output :slight_smile: There are no CPU holdups.

SO NICE!!!!! Now I need to try it with my DH11 sensors, reorder the code to b pretty (not messy and for test purpose) and if my DHT11 is still working, we can say that the entire lib is working, really good news!!!!

you just change the 95 for a 100?
This means that the sensor is taking between 90 and 100 us to send a 0. With all the ping pong conversation that we had, I thing the DHT22 (or maybe just yours) is taking like 10us more in signaling.
really strange behavior and against the datasheet, but Arduino and a cheap sensor doesn't guaranties accurate in timing, so I suppose is a expected behavior.

if you use github, you can push the code with the last mods you make to get it working, so in the history will be your effort!

Ok :slight_smile: Will do!

Before you do it, let me make a branch for that, so is clean and not with all the not making difference commits

Finally is ready. Thanks All for the testig

Sorry it took so long to get the changes in there :slight_smile:

Is it worth implementing more robustness if the sensors are removed (i.e., some interrupt timeouts) -- experiment with disconnecting/reconnecting sensors and you'll see what I mean -- the Arduino seems to freeze. Could be my code though.

Can you report on github please, with the structure:

  • How to reproduce
  • What do you espect
  • What really happens

Dessimat0r:
I am using both the pull up resistor and cap :slight_smile: Like I say, no checksum errors or anything with the Adafruit lib, if the constructor is initialised in front of all the constructors (I removed parts of my code to find out which bit was causing the issues, and the two codes looked the same, except for the constructor order, and I thought 'hmmm, it couldn't be this, could it? that really makes no sense..'. But to rule out any memory issues I'll try it with the simple example.

Could you provide a schema of the pullup and cap ?

Thanks.