Compare commits
No commits in common. "bdf28145a127244e2a245c622835de7a1fc648f7" and "cfd6b2e289d52dba1255d5e3391ae868447808bc" have entirely different histories.
bdf28145a1
...
cfd6b2e289
2 changed files with 4 additions and 4 deletions
1
arduino-fridge-powercontrol.json
Normal file
1
arduino-fridge-powercontrol.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"1":{"temp":10.375,"state":false},"2":{"temp":-127,"state":false}}
|
|
@ -80,8 +80,6 @@ void loop() {
|
||||||
sensors.requestTemperatures();
|
sensors.requestTemperatures();
|
||||||
|
|
||||||
tempSensor1 = sensors.getTempC(addrSensor1);
|
tempSensor1 = sensors.getTempC(addrSensor1);
|
||||||
tempSensor2 = sensors.getTempC(addrSensor2);
|
|
||||||
|
|
||||||
if(tempSensor1 > HTemp1) {
|
if(tempSensor1 > HTemp1) {
|
||||||
digitalWrite(MOSFET1, HIGH);
|
digitalWrite(MOSFET1, HIGH);
|
||||||
fetState1 = 1;
|
fetState1 = 1;
|
||||||
|
@ -89,11 +87,12 @@ void loop() {
|
||||||
digitalWrite(MOSFET1, LOW);
|
digitalWrite(MOSFET1, LOW);
|
||||||
fetState1 = 0;
|
fetState1 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tempSensor2 = sensors.getTempC(addrSensor2);
|
||||||
if(tempSensor2 > HTemp2) {
|
if(tempSensor2 > HTemp2) {
|
||||||
digitalWrite(MOSFET2, HIGH);
|
digitalWrite(MOSFET2, HIGH);
|
||||||
fetState2 = 1;
|
fetState2 = 1;
|
||||||
} else if(tempSensor2 < LTemp1) {
|
} else if(tempSensor1 < LTemp1) {
|
||||||
digitalWrite(MOSFET2, LOW);
|
digitalWrite(MOSFET2, LOW);
|
||||||
fetState2 = 0;
|
fetState2 = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue