Hi all.
I cannot get rid of the error, can anyone advise please?
Regards
Ray
[codeArduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"
sketch_DHT22:9: error: expected constructor, destructor, or type conversion before '(' token
dht22(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino
^
C:\Users\dell\Documents\Arduino\sketch_DHT22\sketch_DHT22.ino: In function 'void setup()':
sketch_DHT22:20: error: 'dht' was not declared in this scope
dht.begin();
^
C:\Users\dell\Documents\Arduino\sketch_DHT22\sketch_DHT22.ino: In function 'void loop()':
sketch_DHT22:27: error: 'dht' was not declared in this scope
hum = dht.readHumidity();
^
exit status 1
expected constructor, destructor, or type conversion before '(' token
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
]
Without seeing your code, all we can tell you is that the compiler is correct. It's never wrong, so that's easy to say.