Browse Source

kitchen_pilot_wire_control.ino: switch off heater if we loose the wifi/MQTT

master
Richard Genoud 5 years ago
parent
commit
841683ec06
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      soft/kitchen/kitchen_pilot_wire_control/kitchen_pilot_wire_control.ino

+ 4
- 0
soft/kitchen/kitchen_pilot_wire_control/kitchen_pilot_wire_control.ino View File

@ -54,4 +54,8 @@ void onConnectionEstablished()
void loop()
{
client.loop();
if (!client.isConnected()) {
// if something wrong happens, switch off the heater
digitalWrite(heating_pin, HIGH);
}
}

Loading…
Cancel
Save