I hope this is the correct place to post this. I have an Arduino UNO and a DHT22 temperature and pressure sensor. a few years ago I added the library and it all seemed to work fine. I’m trying again now and I keep getting errors. Any advice would be appreciated
Error Message
exit status 1
‘dht’ does not name a type
If you cant tell already I’m new
Here is my code
#include <dhtnew.h>
#include <LiquidCrystal.h>
#define dataPin 10
dht DHT; **HERE IS WHERE THE ERROR IS HIGHLIGHTED **
int readData = dht.read22(dataPin);
float t = DHT.Temperature;
float H = DHT.Humidity;
int delayTime(3000);
LiquidCrystal lcd(1,2,4,5,6,7);
void setup() {
lcd.begin(16,2);
}
void loop() {
lcd.print(h);
lcd.setCursor(0,0);
lcd.print("Temperature ");
delay(delayTime);
lcd.setCursor(0,2);
lcd.print("Humidity ");
delay(delayTime);
}