user41024: I recently tried using Hobbyist.co.nz's guide on the DHT11 sensor. I installed the Adafruit_Sensor and DHT11 Sensor libraries,  but it keeps returning with a fatal error.
Here is the code and the error:
#include <dht.h>

#define dht_dpin A0 //no ; here. Set equal to channel sensor is on

dht DHT;

void setup(){
  Serial.begin(9600);
  delay(300);//Let system settle
  Serial.println("Humidity and temperature\n\n");
  delay(700);//Wait rest of 1000ms recommended delay before
  //accessing sensor
}//end "setup()"

void loop(){
  //This is the "heart" of the program.
  DHT.read11(dht_dpin);

    Serial.print("Current humidity = ");
    Serial.print(DHT.humidity);
    Serial.print("%  ");
    Serial.print("temperature = ");
    Serial.print(DHT.temperature); 
    Serial.println("C  ");
  delay(800);//Don't try to access too frequently... in theory
  //should be once per two seconds, fastest,
  //but seems to work after 0.8 second.
}// end loop()


C:\Users\XXXXXX\Documents\Arduino\sketch_dec19c\sketch_dec19c.ino:2:17:

fatal error: dht.h: No such file or directory
#include <dht.h>



user27653: The examples I can see from Adafruit say
#include "DHT.h"

or
#include <DHT.h>

But you wrote
#include <dht.h>

They aren't the same.
Further, the examples for the Adafruit library show usage like:
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  // Read temperature as Celsius (the default)
  float t = dht.readTemperature();
  // Read temperature as Fahrenheit (isFahrenheit = true)
  float f = dht.readTemperature(true);

But you call DHT.temperature and DHT.humidity.
If you are meaning to use the Adafruit library, you have to write your code according to their documentation.
Also of note, you have defined the type of the object as dht and the name as DHT, but for Adafruit, the type is DHT.
EDIT:
The example on the website you note has a downloadable zip file for the DHT library they use. You cannot assume that all libraries for interfacing a certain sensor will all have the same programming interface.

41024: <p>I recently tried using Hobbyist.co.nz's guide on the DHT11 sensor. I installed the Adafruit_Sensor and DHT11 Sensor libraries,  but it keeps returning with a fatal error.</p>

<p>Here is the code and the error:</p>

<pre><code>#include &lt;dht.h&gt;

#define dht_dpin A0 //no ; here. Set equal to channel sensor is on

dht DHT;

void setup(){
  Serial.begin(9600);
  delay(300);//Let system settle
  Serial.println("Humidity and temperature\n\n");
  delay(700);//Wait rest of 1000ms recommended delay before
  //accessing sensor
}//end "setup()"

void loop(){
  //This is the "heart" of the program.
  DHT.read11(dht_dpin);

    Serial.print("Current humidity = ");
    Serial.print(DHT.humidity);
    Serial.print("%  ");
    Serial.print("temperature = ");
    Serial.print(DHT.temperature); 
    Serial.println("C  ");
  delay(800);//Don't try to access too frequently... in theory
  //should be once per two seconds, fastest,
  //but seems to work after 0.8 second.
}// end loop()
</code></pre>

<blockquote>
<pre><code>C:\Users\XXXXXX\Documents\Arduino\sketch_dec19c\sketch_dec19c.ino:2:17:
</code></pre>
  
  <p>fatal error: dht.h: No such file or directory</p>

<pre><code>#include &lt;dht.h&gt;
</code></pre>
</blockquote>
 27653: <p>The examples I can see from Adafruit say</p>

<pre><code>#include "DHT.h"
</code></pre>

<p>or</p>

<pre><code>#include &lt;DHT.h&gt;
</code></pre>

<p>But you wrote</p>

<pre><code>#include &lt;dht.h&gt;
</code></pre>

<p>They aren't the same.</p>

<p>Further, the examples for the Adafruit library show usage like:</p>

<pre><code>  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  // Read temperature as Celsius (the default)
  float t = dht.readTemperature();
  // Read temperature as Fahrenheit (isFahrenheit = true)
  float f = dht.readTemperature(true);
</code></pre>

<p>But you call <code>DHT.temperature</code> and <code>DHT.humidity</code>.</p>

<p>If you are meaning to use the Adafruit library, you have to write your code according to their documentation.</p>

<p>Also of note, you have defined the type of the object as <code>dht</code> and the name as <code>DHT</code>, but for Adafruit, the type is <code>DHT</code>.</p>

<p><strong>EDIT:</strong></p>

<p>The example on the website you note has a downloadable zip file for the DHT library they use. You cannot assume that all libraries for interfacing a certain sensor will all have the same programming interface.</p>
