user57141: I am trying to read the humidity and temperature using a DHT11 temperature sensor for an Arduino UNO using the DHT.h library. I have my code below:
#include <DHT.h>
#define dataPin 4
dht DHT;

void setup() {
  Serial.begin(9600)

}

void loop() {
  int readData = DHT.read11(dataPin);
  float t = DHT.temperature;
  float h = DHT.humidity;
  Serial.println("Temperature: ")
  Serial.print(t)
  Serial.print(" ºC")
  Serial.println("Humidity: ")
  Serial.print(h)
  Serial.print(" % ")
  delay(2000)
}

When compiling the program, it gives me an error: 
fatal error: DHT.h: No such file or directory

I have also tried with lower case letters, but it will not work. Is there any reason why? Do I have to install it? I have tried to search for the library in the Arduino app Sketch - Include Library - Manage Libraries, but the library is not there.

user26916: 
Download https://github.com/RobTillaart/Arduino/archive/master.zip
Copy the Arduino-master/libraries/DHTstable subfolder of the downloaded file to the libraries subfolder of your sketchbook folder. You can find the location of your sketchbook folder at File > Preferences > Sketchbook location in the Arduino IDE.
Change the first line of your sketch from:
#include <DHT.h>

to:
#include <dht.h>


Now when you try to compile the sketch you will still encounter many errors. However, these are caused by a paucity of semicolons, not by the DHT library, and thus off-topic for this question.

57141: <p>I am trying to read the humidity and temperature using a DHT11 temperature sensor for an Arduino UNO using the <code>DHT.h</code> library. I have my code below:</p>

<pre><code>#include &lt;DHT.h&gt;
#define dataPin 4
dht DHT;

void setup() {
  Serial.begin(9600)

}

void loop() {
  int readData = DHT.read11(dataPin);
  float t = DHT.temperature;
  float h = DHT.humidity;
  Serial.println("Temperature: ")
  Serial.print(t)
  Serial.print(" ºC")
  Serial.println("Humidity: ")
  Serial.print(h)
  Serial.print(" % ")
  delay(2000)
}
</code></pre>

<p>When compiling the program, it gives me an error: </p>

<pre><code>fatal error: DHT.h: No such file or directory
</code></pre>

<p>I have also tried with lower case letters, but it will not work. Is there any reason why? Do I have to install it? I have tried to search for the library in the Arduino app <strong>Sketch - Include Library - Manage Libraries</strong>, but the library is not there.</p>
 26916: 

<ol>
<li>Download <a href="https://github.com/RobTillaart/Arduino/archive/master.zip" rel="nofollow noreferrer">https://github.com/RobTillaart/Arduino/archive/master.zip</a></li>
<li>Copy the <code>Arduino-master/libraries/DHTstable</code> subfolder of the downloaded file to the <code>libraries</code> subfolder of your sketchbook folder. You can find the location of your sketchbook folder at <strong>File > Preferences > Sketchbook location</strong> in the Arduino IDE.</li>
<li><p>Change the first line of your sketch from:</p>

<pre class="lang-cpp prettyprint-override"><code>#include &lt;DHT.h&gt;
</code></pre>

<p>to:</p>

<pre class="lang-cpp prettyprint-override"><code>#include &lt;dht.h&gt;
</code></pre></li>
</ol>

<p>Now when you try to compile the sketch you will still encounter many errors. However, these are caused by a paucity of semicolons, not by the DHT library, and thus off-topic for this question.</p>
