Friday, August 5, 2016

ESP8266Basic KY-019 - Relay

Testing the 37in1 'Arduino' sensor kit item KY-019 with ESP8266Basic.
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

cls
PinRelay = 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: