From d03f00e529bb42ee39bcbea881a5ed32fbe62e80 Mon Sep 17 00:00:00 2001 From: Marcus Date: Tue, 8 Aug 2023 22:25:27 +0200 Subject: [PATCH] troubleshooting --- arduino-fridge-powercontrol.json | 1 - main/main.ino | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 arduino-fridge-powercontrol.json diff --git a/arduino-fridge-powercontrol.json b/arduino-fridge-powercontrol.json deleted file mode 100644 index 0009a2c..0000000 --- a/arduino-fridge-powercontrol.json +++ /dev/null @@ -1 +0,0 @@ -{"1":{"temp":10.375,"state":false},"2":{"temp":-127,"state":false}} diff --git a/main/main.ino b/main/main.ino index 7ada6b7..5eb658a 100644 --- a/main/main.ino +++ b/main/main.ino @@ -80,6 +80,8 @@ void loop() { sensors.requestTemperatures(); tempSensor1 = sensors.getTempC(addrSensor1); + tempSensor2 = sensors.getTempC(addrSensor2); + if(tempSensor1 > HTemp1) { digitalWrite(MOSFET1, HIGH); fetState1 = 1; @@ -87,8 +89,7 @@ void loop() { digitalWrite(MOSFET1, LOW); fetState1 = 0; } - - tempSensor2 = sensors.getTempC(addrSensor2); + if(tempSensor2 > HTemp2) { digitalWrite(MOSFET2, HIGH); fetState2 = 1;