woensdag 10 augustus 2016

ESP8266Basic KY-004 - Button module

Tested 37in1 SensorKit "arduino" module KY-004 now with ESP8266 / ESP8266Basic

KY-004 37-1 Key switch module

Hardware connection
  • Pin S              Signal - PinIn  = 2
  • Pin middel       VCC +3V3
  • Pin -               Ground

The ESP8266Basic program

' TestKY004
' This TestPinIn.bas
' Program to test the value of PinIn and display it

PinIn = 2

timer 1000 , [NewVal]

wait

[NewVal]
cls
msg$ = "<head><meta http-equiv='refresh' content='1'></head><H1>TestPinInn</H1>" &  time() & " Pin ( " &  PinIn & " ) = " & io( pi , PinIn  )
html htmlvar( msg$ )

returngui

wait

end







Geen opmerkingen: