Advertisement
Guest User

init.lua

a guest
May 3rd, 2015
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1.  --init.lua
  2.  wifi.setmode(wifi.STATIONAP)
  3.  wifi.sta.config("Accespoint","Wachtwoord")
  4.  wifi.sta.connect()
  5.  tmr.alarm(1, 1000, 1, function()
  6.   if wifi.sta.getip()== nil then
  7.   print("IP unavaiable, Waiting...")
  8.  else
  9.   tmr.stop(1)
  10.  print("ESP8266 mode is: " .. wifi.getmode())
  11.  print("The module MAC address is: " .. wifi.ap.getmac())
  12.  print("Config done, IP is "..wifi.sta.getip())
  13.  dofile ("emon.lua")
  14.  end
  15.  end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement