Hello everyone
I'm having some trouble connecting my 5V Relay to the Wemos D1 board.
Basically I want to make the relay to switch on and off a lamp, but the problem is that it doesn't respond to the code I written. HERE IS MY CODE.
Also I don't know if I'm using the right pin and the correct pin reference in the code, and when I connect the signal wire(the green one) to the D10 pin, the green light on relay turns on so the relay must be functional.
In the attachments there is a picture of the kit when it's up and running and programmed using the code above.
By the way I am able to turn the built-in LED on and off using WiFi so the board seems to be fine.
Thanks for your help.
---UPDATE---
I tried a much simpler way, I connected a kit of 6 LEDs (3V) and this time I used the D8 pin to turn on and off the LEDs.
I tested two scenarios, at first I started the Wemos without any code or program just to see if the light turn on, and as expected they didn't.
Second time I used -pinMode(0, OUTPUT)- in setup method and ran the code, this time the lights turned on.
But in continue when I tried to turn off the LEDs by -digitalWrite(0, LOW)- command nothing happened.
Any suggestions?