diff --git a/src/main.cpp b/src/main.cpp index 9bc3414..435405f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,6 +28,7 @@ void loop() { int temperature = readTemperature(); if (temperature == DHT_ERROR_VALUE) { Serial.println("Error reading temperature"); + delay(2000); return; } Serial.print("Temperature: "); @@ -40,6 +41,7 @@ void loop() { turnFanOff(); turnLedOff(); } + delay(2000); } /** diff --git a/src/main.hpp b/src/main.hpp index 8f07dd4..7b0608e 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -14,7 +14,7 @@ #define BUZZER_PIN 4 #define DHT_PIN 2 -#define FAN_ON_TEMP 35 +#define FAN_ON_TEMP 30 #define FAN_SPEED 120 #define DHT_ERROR_VALUE -999