#define Type DHT11
int sensePin = 2;
DHT HT(sensePin, Type);
float humidity;
float tempC;
float tempF;
int dt = 200;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
HT.begin();
delay(dt);
}
void loop() {
// put your main code here, to run repeatedly:
humidity = HT.readHumidity();
tempC = HT.readTemperature();
tempF = HT.readTemperature(true);
Im getting this error:
Sketch uses 5226 bytes (17%) of program storage space. Maximum is 30720 bytes.
Global variables use 257 bytes (12%) of dynamic memory, leaving 1791 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\.\COM2": Access is denied.
Failed uploading: uploading error: exit status 1
when i restart my laptop and run the program it works for the first time then makes a sound then keeps giving me this error and i tried change the COM. Its telling me COM3 is being used so im not using that COM.