Can someone help me with my dht22

Hi, everyone!
I'm trying to use my dht22 with my 2X16LCD (I typed my dht22 into dht11 :stuck_out_tongue: )
the code is like this:

#include <LiquidCrystal.h>
#include <dht.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
dht DHT11;
#define DHT11Pin 7;

void setup() {     
lcd.begin(16, 2);
Serial.begin(9600);  
} 

void loop() {  
lcd.setCursor(0, 0);
int chk = DHT11.read(DHT11Pin);
switch (chk) {     
case 0:       
lcd.print("Humidity:");       
lcd.print((float)DHT11.humidity, 1);       
lcd.print("%");       
lcd.setCursor(0, 1);       
lcd.print("Tempure:");       
lcd.print((float)DHT11.temperature, 1);       
lcd.print("oC");
break;     
case -1:       
lcd.print("Checksum error"); 
break;     
case -2:       
lcd.print("Time out error"); 
break;     
default:       
lcd.print("Unknown error"); 
break;   
}  
delay(1000); 
}

and it is keep writing:
exit status 1
expected ')' before ';' token

please help me, thank you

You've already been asked to use code tags in your previous thread. Read How to post code properly and then use the </> icon to create [code]...[/code] tags around your code so that it is easier to read.

Pete

Apart from the error message itself, the IDE also (usually) prints the line number that caused the error and the line itself with an indication of where in the line the problem lies. Like this:

sketch_sep08b:5: error: expected ')' before ';' token

 #define DHT11Pin 7;

                   ^

It is saying that there's something wrong at, or before, the semicolon. Why do you have a semicolon at the end of a #define macro?

Pete

El_supremo thank you very much, I did this project all night thank you!!!

You're welcome :slight_smile:

Pete