Digital pins turns HIGH on my NodeMcu V3

Okay, first of all, pin D3 (GPIO 0) isn’t a good choice of pin for your relay. See this article:

Also, you’re not defining any pinmode for the relay pin, or have any code to control it. You may be doing some direct digital pin manipulation from a widget in the app, but you don’t mention this.

You don’t say if your relay is active HIGH or active LOW, but a pinmode statement in your void setup, followed by a digitalwrite command to set the pin to the opposite of what your relay needs to activate, should do the trick.

Pete.

1 Like