This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wifi.setmode(wifi.STATION) | |
| wifi.sta.config("creationix","noderocks") | |
| wifi.sta.connect() | |
| tmr.alarm(0, 1000, 1, function () | |
| local ip = wifi.sta.getip() | |
| if ip then | |
| tmr.stop(0) | |
| print(ip) | |
| dofile("websocket.lc") | |
| dofile("main.lc") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import asyncio | |
| import sys | |
| from asyncio.streams import StreamWriter, FlowControlMixin | |
| reader, writer = None, None | |
| @asyncio.coroutine | |
| def stdio(loop=None): |