Files
NodeMCU_Lua/LED_RGB_WS2812/chapeau_led/wifi_get_ip.lua
Christian Zufferey cb81ed2a22 Super bien avancé sur la démo du chapeau, good job
* il y a maintenant un petit serveur WEB qui permet de modifier certains paramètres de l'effet lumineux
2018-12-05 20:51:10 +01:00

13 lines
398 B
Lua

-- Petit script pour obtenir l'adresse IP du NodeMCU connecté sur un AP Wifi
print("\n wifi_get_ip.lua zf181119.2318 \n")
wifitimer1=tmr.create()
tmr.alarm(wifitimer1, 1000, tmr.ALARM_AUTO , function()
if wifi.sta.getip() == nil then
print("Connecting to AP...")
else
tmr.stop(wifitimer1)
f= "wifi_info.lua" if file.exists(f) then dofile(f) end
end
end)