Compare commits
2 commits
cfd6b2e289
...
bdf28145a1
Author | SHA1 | Date | |
---|---|---|---|
bdf28145a1 | |||
d03f00e529 |
2 changed files with 4 additions and 4 deletions
|
@ -1 +0,0 @@
|
|||
{"1":{"temp":10.375,"state":false},"2":{"temp":-127,"state":false}}
|
|
@ -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,12 +89,11 @@ void loop() {
|
|||
digitalWrite(MOSFET1, LOW);
|
||||
fetState1 = 0;
|
||||
}
|
||||
|
||||
tempSensor2 = sensors.getTempC(addrSensor2);
|
||||
|
||||
if(tempSensor2 > HTemp2) {
|
||||
digitalWrite(MOSFET2, HIGH);
|
||||
fetState2 = 1;
|
||||
} else if(tempSensor1 < LTemp1) {
|
||||
} else if(tempSensor2 < LTemp1) {
|
||||
digitalWrite(MOSFET2, LOW);
|
||||
fetState2 = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue