DHT11 ERRORS!! Please Help!!

Hello Sir,

I am working on a Humidity cum Temperature Sensor (type: DHT11)

Please help me with the coding errors I’m getting after compilation(Image attached)

I have downloaded the library for DHT11 from the link: http://playground.arduino.cc/Main/DHT11Lib#.UzniTvnaJ8k
and installed it as shown in the link: http://arduino.cc/en/Guide/Libraries#.UyCIAV6prdU

& I saved the library in : –>Documents–>Arduino–>libraries–>idDHT11
Let me know if its in the right place.

Here is my code which I’m running on Arduino 1.0.5r2 IDE:

#include "DHT.h"
#include <LiquidCrystal.h>
dht DHT;
#define DHTPIN 8   
#define DHTTYPE DHT11 
DHT dht(DHT_PIN, DHTTYPE);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
dht.begin();
}
void loop() {
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(t) || isnan(h)) {
  Serial.println("Failed to read from DHT");
  }
else {
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Temp=");
  lcd.print(t);
  lcd.print(" *C");
  lcd.setCursor(0,1);
  lcd.print("Humidity=");
  lcd.print(h);
  lcd.print("% ");
  delay(500);
 }
}

Code Errors:

DHT11.ino:1:17: error: DHT.h: No such file or directory
DHT11:3: error: ‘dht’ does not name a type
DHT11:6: error: ‘DHT’ does not name a type
DHT11.ino: In function ‘void setup()’:
DHT11:11: error: ‘dht’ was not declared in this scope
DHT11.ino: In function ‘void loop()’:
DHT11:14: error: ‘dht’ was not declared in this scope

Please let me know If I have left out any information regarding my query.

Thanks in advance.

Don't ever use screen captures they can't be read! Just copy and paste!

Mark

nehaberi:
& I saved the library in : –>Documents–>Arduino–>libraries–>idDHT11
Let me know if its in the right place.

#include "DHT.h"

It’s almost in the right place. The file you are including is called DHT.h, but it’s in a directory called idDHT11
Check inside the directory, and change the directory name and the include name to be the same as the .h file.

So,. if the .h file is DHT11.h, chenge the directory name to DHT11, and the include to:

#include <dht11.h>

Im still unable to fix it.. Can any one help please?

Can any one help please?

Sure. Send me your computer.

You have been told that there are changes you need to make. You haven't acknowledged making any of them. So, it's no wonder that nothing has gotten any better.