Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print(wifi.sta.getip())
- wifi.setmode(wifi.STATION)
- wifi.sta.config("Loppen Public","")
- print(wifi.sta.getip())
- s=net.createServer(net.TCP,180)
- s:listen(2323,function(c)
- function s_output(str)
- if(c~=nil)
- then c:send(str)
- end
- end
- node.output(s_output, 0)
- c:on("receive",function(c,l)
- node.input(l)
- end)
- c:on("disconnection",function(c)
- node.output(nil)
- end)
- print("Welcome to NodeMcu world.")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement