Etendu le délais du mode AP à 60 secondes au moment du boot pour avoir le temps de récupérer l'adresse IP du NodeMCU

This commit is contained in:
Christian Zufferey
2019-12-23 23:21:18 +01:00
parent d67f5a38c8
commit cd6e4cb9a4
2 changed files with 7 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
-- Scripts à charger après le boot pour démarrer son projet
print("\n boot2.lua zf191223.1215 \n")
print("\n boot2.lua zf191223.2320 \n")
function boot2()
second_chance=nil initz=nil boot=nil zLED=nil
@@ -17,7 +17,7 @@ function boot2()
ap_ssid=nil ap_pwd=nil
f= "web_srv2.lua" if file.exists(f) then dofile(f) end
boot2_tmr3=tmr.create()
boot2_tmr3:alarm(30*1000, tmr.ALARM_SINGLE, function()
boot2_tmr3:alarm(60*1000, tmr.ALARM_SINGLE, function()
print("BOOOOUM, y'a plus de AP WIFI !")
wifi.setmode(wifi.STATION,true) boot2_tmr3=nil
print(node.heap()) collectgarbage() print(node.heap())