print("Setting up Wifi AP") wifi.setmode(wifi.SOFTAP) cfg = { ip="192.168.5.1", netmask="255.255.255.0", gateway="192.168.5.1" } wifi.ap.setip(cfg) wifi.ap.config({ssid="DareWeather"}) -- wifi.sta.connect() wifi.sta.status() local timer1 = tmr.create() timer1:alarm(1000, tmr.ALARM_AUTO, function () if wifi.ap.getip()== nil then print("Waiting for IP...") else timer1:unregister() print("ESP8266 mode is: " .. wifi.getmode()) print("The module MAC address is: " .. wifi.ap.getmac()) print("Config done, IP is "..wifi.ap.getip()) print("5 seconds to stop timer 0") print("Connect to wifi access point 'DareWeather' and then navigate to IP address '192.168.5.1' on your web browser") -- dofile("main_ap.lua") dofile("main_ap.lc") end end)