I am trying to connect my 8 Channel Relay to my NodeMCU 12E and use it for automation with Alexa.
For digital output I am using the ports: D0,D1,D2,D4,D5,D6,D7,D8
And for power:
Relay(VCC) -> Board Vin
Relay(GND) -> Board GND
This is being powered by a micro USB cable coming from my computer.
After uploading, the code works properly. When i disconnect and reconnect the power cable the code just doesn't work-unless i take out the GND and Vin wires before connecting the power cable and then plug both back in.
After online research I was recommended not to use D3, D4, D8, so how can I get 8 ports to connect to my relay?
NodeMCU 12E: