diff --git a/src/channel.c b/src/channel.c index 9b8f71e..6bd026e 100644 --- a/src/channel.c +++ b/src/channel.c @@ -155,6 +155,9 @@ void channel_set(int idx, bool state) { s_channels[idx].relay_state = state; if (s_channels[idx].relay_gpio != GPIO_INVALID) { mgos_gpio_write(s_channels[idx].relay_gpio, state); + // We sleep for 50ms because inductive loads cause an RF spike which trips + // capacitive sensors + mgos_msleep(50); } if (s_channels[idx].led_gpio != GPIO_INVALID) { mgos_gpio_write(s_channels[idx].led_gpio, state);