Im getting this error message with my arduino code "request for member 'read11' in 'sensor', which is of non-class type 'DHT()'"
#include <DHT.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int greenPin = A0;
DHT sensor();
void setup()
{
lcd.begin(16,2); //16 by 2 character display
}
void loop()
{
delay(1000); //wait a sec (recommended for DHT11)
sensor.read11(greenPin);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Humidity = ");
lcd.print(sensor.humidity);
lcd.setCursor(0,1);
lcd.print("Temp = ");
lcd.print(sensor.temperature);
}
I have downloaded the library it said to download, please help!
I took it from this website btw just to avoid copywright issues: https://www.hive-rd.com/blog/arduino-dht11-output-lcd-module/