does not name a type error....Urgent help needed

#include <RHT03.h>
#include <LiquidCrystal.h>
dht DHT;

#define DHT22_PIN 6

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int tempswitchin = A0;  //number of input pin for temperature switching
int tempswitchout = 2;  //number of output pin sending temperature sensor value to LCD

int state = HIGH;  //the current state of the output pin
int reading;       //current reading of the input pin
int previous = LOW;//previous reading from input pin

//using long variables because the time, measured in miliseconds,
//will quickly become a bigger number than can be stored in an int.

long time = 0;         // the last time the output pin was toggled
long debounce = 200;   // the debounce time, increase if the output flickers

// variables:
boolean isError = false;

void setup() 
{
  pinMode(tempswitchin, INPUT);
  pinMode(tempswitchout, OUTPUT);


{
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
    
  lcd.setCursor(0, 0);//add this to loop or add a boolean function to display the headings after error
  lcd.print("DHT");//
  lcd.setCursor(5, 0);//
  lcd.print("H/%");//
  lcd.setCursor(11, 0);//
  lcd.print("T/oC");//
}
}

void loop() 

 {
   reading = digitalRead(tempswitchin);
   // using an if statement, so if the input just went from LOW to HIGH and we've waited long enough
   // to ignore any noise on the circuit, toggle the output pin and remember the time
   if (reading == HIGH && previous == LOW && millis() - time > debounce) {
     if (state == HIGH)
       state = LOW;
     else
       state = HIGH;

     time = millis();    
           }
    {  
   
    // READ DATA
    int chk = DHT.read22(DHT22_PIN);
    switch (chk)
    {
        case DHTLIB_OK:
         
            lcd.setCursor(0, 1);
            lcd.print(" OK  "); 
            isError = false;
            break;
        case DHTLIB_ERROR_CHECKSUM: 
            lcd.setCursor(0, 1);
            lcd.print("CHKSM"); 
            isError = true; 
            break;
        case DHTLIB_ERROR_TIMEOUT: 
            lcd.setCursor(0, 1);
            lcd.print("TMOUT"); 
            isError = true;  
            break;
        default: 
            lcd.setCursor(0, 1);
            lcd.print("UKERR"); 
            isError = true;  
            break;
    }
    // DISPLAY DATA
    
    lcd.setCursor(5, 1);
    lcd.print(DHT.humidity, 1); //displays humidity to 1 decimal place
    lcd.setCursor(11, 1);
    lcd.print(DHT.temperature, 1); //displays temeperature to 1 decimal place
    delay(1000);  
   }
 }

above is my ‘work in progress’ code for displaying data from a rht03 temp/humidity sensor to an lcd. it was working fine when i was working with it on the university pc but when i came home and installed arduino i got these errors

project:3: error: ‘dht’ does not name a type
project.ino: In function ‘void loop()’:
project:61: error: ‘DHT’ was not declared in this scope
project:64: error: ‘DHTLIB_OK’ was not declared in this scope
project:70: error: ‘DHTLIB_ERROR_CHECKSUM’ was not declared in this scope
project:75: error: ‘DHTLIB_ERROR_TIMEOUT’ was not declared in this scope

i included the RHT03.h and RHT03.cpp files in the libraries folder of arduino (both inside folder named RHT03)

its just messing up my head

i included the RHT03.h and RHT03.cpp files in the libraries folder of arduino (both inside folder named RHT03)

Which libraries folder? Where did you get this library (so others can check it out)?

Did you restart the Arduino application so it knows about the new libraries?

Check the File-> Examples menu. Is the library there?

-br

thanks for the very quick replies

@paulS: i put these files in the libraries folder E:/....arduino-1.0.4-windows\arduino-1.0.4\libraries\ and i got these libraries from https://github.com/ringerc/Arduino-DHT22 [link source: http://playground.arduino.cc/Main/DHTLib]

@billroy: yes i restarted the application multiple times, didnt think it would make a difference but also changed the name of the rht03.h to dht.h but to no avail

And the library shows up properly in the File -> Examples menu?

And the examples for the library - do they compile?

-br

billroy: And the library shows up properly in the File -> Examples menu?

And the examples for the library - do they compile?

-br

since i changed the folder name to dht, the DHT shows up in the second section of the examples menu and the serial file in the examples folder does show up but it does not compile but it has its own stupid list of errors

i put these files in the libraries folder E:/....arduino-1.0.4-windows\arduino-1.0.4\libraries\

That's for CORE libraries. User downloaded libraries do not go in the CORE library folder.

The files in the link you provided are called DHT22.h and DHT22.cpp. Where did the name rht03.h come from?

PaulS:

i put these files in the libraries folder E:/....arduino-1.0.4-windows\arduino-1.0.4\libraries\

That's for CORE libraries. User downloaded libraries do not go in the CORE library folder.

The files in the link you provided are called DHT22.h and DHT22.cpp. Where did the name rht03.h come from?

hmmmm....so custom libraries can be anywhere on the drive or isthere another folder for them.

RHT03 is the code given to sensor by different vendors some give it dht22 among others

please dont abandon me =(

AbdulW87: hmmmm....so custom libraries can be anywhere on the drive or isthere another folder for them.

http://www.arduino.cc/en/Hacking/Libraries

User-created libraries as of version 0017 go in a subdirectory of your default sketch directory. For example, on OSX, the new directory would be ~/Documents/Arduino/libraries/. On Windows, it would be My Documents\Arduino\libraries.

Arrch:

AbdulW87: hmmmm....so custom libraries can be anywhere on the drive or isthere another folder for them.

http://www.arduino.cc/en/Hacking/Libraries

User-created libraries as of version 0017 go in a subdirectory of your default sketch directory. For example, on OSX, the new directory would be ~/Documents/Arduino/libraries/. On Windows, it would be My Documents\Arduino\libraries.

thanks for the reply but i already found out where the user libraries go but it si still not working i am stumped

i found this helpful link and i am think the solution might be near but i cant figure it out http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use/common-library-problems

i cannot see the library in the example menu now so dont know what gone wrong

AbdulW87: i cannot see the library in the example menu now so dont know what gone wrong

You shouldn't be looking in the example menu, you should be looking in the Tools > Import Library menu. If its not there, then its not properly installed.