From 5584200c67818b3a1e0be3b6a99aa3db354607b6 Mon Sep 17 00:00:00 2001 From: Richard Genoud Date: Mon, 23 Sep 2019 18:38:17 +0200 Subject: [PATCH] kitchen_pilot_wire_control.ino: on/off logic is inverted --- .../kitchen_pilot_wire_control/kitchen_pilot_wire_control.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/soft/kitchen/kitchen_pilot_wire_control/kitchen_pilot_wire_control.ino b/soft/kitchen/kitchen_pilot_wire_control/kitchen_pilot_wire_control.ino index 5eb5491..1d7df7a 100644 --- a/soft/kitchen/kitchen_pilot_wire_control/kitchen_pilot_wire_control.ino +++ b/soft/kitchen/kitchen_pilot_wire_control/kitchen_pilot_wire_control.ino @@ -23,17 +23,17 @@ void message_callback(const String &message) { Serial.println(message); if (message == "off") { - digitalWrite(heating_pin, LOW); + digitalWrite(heating_pin, HIGH); } if (message == "on") { - digitalWrite(heating_pin, HIGH); + digitalWrite(heating_pin, LOW); } } void setup() { - pinMode(heating_pin, OUTPUT); // Initialize the LED_BUILTIN pin as an output - digitalWrite(heating_pin, LOW); // Turn the LED on (Note that LOW is the voltage level + pinMode(heating_pin, OUTPUT); + digitalWrite(heating_pin, HIGH); // by default output the voltage that switches off the heater Serial.begin(115200);