How to download library

You forgot to use code tags for the error message as I requested.

You forgot to make the link clickable as I requested.

Using code tags and other important information is explained in the How to use this forum post. Please read it.

If you look at that Playground page, you'll see this at the top:

latest version on github

So unless you have a good reason for using the version of the library on the Playground page I recommend you to use the version on GitHub since the Playground one is likely to be outdated.

Unfortunately the GitHub repository is a bit of a mess because it has about 50 different libraries mashed into a single repository, which makes installation a bit more complicated. Here's instructions for installing the library from GitHub:

  • Download https://github.com/RobTillaart/Arduino/archive/master.zip
  • Copy the folder libraries/DHTlib from the downloaded file to the libraries subfolder of your sketchbook folder. If you don't know the location of your sketchbook folder you can find it at File > Preferences > Sketchbook location
  • Restart the Arduino IDE if it's running.
  • You will now find the examples that are included with the library at File > Examples > INCOMPATIBLE > DHTlib. Don't worry about the INCOMPATIBLE thing or the "WARNING: library DHTlib claims to run on (atmelavr) architecture(s) and may be incompatible with your current board which runs on (avr) architecture(s)." warning you'll get during compilation. That's just caused by an incorrect architectures value in the library metadata. I have submitted a pull request to fix this (again): [DHTlib] Use correct architectures value in library.properties by per1234 · Pull Request #82 · RobTillaart/Arduino · GitHub.

Correct folder structure after you've installed the library:

{sketchbook folder}
|_libraries
|_DHTlib