Hi,
I am trying to compile a sketch (trying to read the temperature from the DHT11 sensor)
Sketch:
#include <dht.h>
dht DHT;
#define DHT11_PIN 7
void setup(){
Serial.begin(9600);
}
void loop()
{
int chk = DHT.read11(DHT11_PIN);
Serial.print("Temperature = ");
Serial.println(DHT.temperature);
Serial.print("Humidity = ");
Serial.println(DHT.humidity);
delay(1000);
}
And I get the following error Message:
Arduino:1.8.5 (Windows Store 1.8.10.0) (Windows 10), Kort"Arduino/Genuino Uno"
c:/program files/windowsapps/arduinollc.arduinoide_1.8.10.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Can anyone help me With this error?