The relay is a 5V relay for Arduino. 3V3 also seems to work fine on the 3V3 ESP8266
Connections
S signal ( Pin 5 [labeled on my development module GPIO04 } )+ VCC 3V3
- GND
Program
clsPinRelay = 5
html | <h1>Testing relay KY-019</h1> |
html | Connected to pin | & PinRelay & | <br><br> |
button "Set Pin Relay High", [SetPinRelayHigh]
html | <br><br> |
button "Set Pin Relay Low", [SetPinRelayLow]
html | <br><br> |
button " Exit", [Exit]
html | <br> |
wait
[SetPinRelayLow]
io(po,5,0)
wait
[SetPinRelayHigh]
io(po,5,1)
wait
[Exit]
end
No comments:
Post a Comment