yet another DHT11 Class for Arduino

Thanks for sharing this version, I added a link to your work in the playground article.

Most interesting change is to give the datapin in the constructor, so you have more the OO approach iso functional approach. To support multiple sensors you will make one unique object per sensor, where my approach is to have one object to rule them all.

some questions:

  • Did you measure the effect of the code changes on the footprint (per object) ?

  • Are you familiar with - Arduino Playground - DHTLib - which supports the DHT22 too (and DHT21 under test) ?
    This is my preferred lib for DHT sensors, and I still want to rewrite it in OO with a base class and 3 derived classes.

  • can you add a link to the playground in your code?

Final note, I see you used the goto statement to handle error conditions. Although you did it in a structured way to handle error conditions it is discouraged as goto's can disrupt code/stack/heap.