Hi, everyone!
I'm trying to use my dht22 with my 2X16LCD (I typed my dht22 into dht11 )
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