Class for DHT11, DHT21 and DHT22 (temperature & humidity)

Hi robtllaart

robtillaart:
updated the code to 0.1.03;

  • added code to reflect faulty reading in temperature (-999) and humidity (-999) if there is a timeout. So if a sketch does not test the return value of read11() or read22() you will still see it clearly.

As allways comments still welcome

I would change the follow code in read22() and read11() functions from

int rv = read(pin);
        if (rv != 0) 
    {

to

int rv = read(pin);
        if (rv != DHTLIB_OK) 
    {

No functionally change but improves readability.