|
|
@ -116,6 +116,8 @@ void setup() |
|
|
|
|
|
|
|
heaters[KITCHEN].callback = kitchen_callback; |
|
|
|
|
|
|
|
lwdTicker.attach_ms(LWD_TIMEOUT_MS / 2, lwdtcb); |
|
|
|
|
|
|
|
for (i = 0; i < NB_HEATERS; i++) { |
|
|
|
pinMode(heaters[i].pin, OUTPUT); |
|
|
|
heater_off(heaters[i].pin); |
|
|
@ -146,6 +148,8 @@ void loop() |
|
|
|
static unsigned int counter; |
|
|
|
static bool led_state = false; |
|
|
|
|
|
|
|
lwdtFeed(); |
|
|
|
|
|
|
|
client.loop(); |
|
|
|
if (!client.isConnected()) { |
|
|
|
// if something wrong happens, switch off the heater
|
|
|
@ -160,5 +164,4 @@ void loop() |
|
|
|
led_on(led_state); |
|
|
|
} |
|
|
|
counter++; |
|
|
|
lwdtFeed(); |
|
|
|
} |