Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --init.lua
- wifi.setmode(wifi.STATIONAP)
- wifi.sta.config("Accespoint","Wachtwoord")
- wifi.sta.connect()
- tmr.alarm(1, 1000, 1, function()
- if wifi.sta.getip()== nil then
- print("IP unavaiable, Waiting...")
- else
- tmr.stop(1)
- print("ESP8266 mode is: " .. wifi.getmode())
- print("The module MAC address is: " .. wifi.ap.getmac())
- print("Config done, IP is "..wifi.sta.getip())
- dofile ("emon.lua")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement