- juste synchronisation avec mon mac book air

This commit is contained in:
Christian Zufferey
2018-08-23 10:33:24 +02:00
parent c8a891a08b
commit 4de81d02d1
37 changed files with 23 additions and 30 deletions
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
+4 -14
View File
@@ -1,15 +1,5 @@
-- Démarre le WIFI en mode AP
print("\wifi_ap_start.lua zf180822.1544 \n")
local zmodewifi=wifi.getmode()
if zmodewifi == wifi.NULLMODE then
print("WIFI mode AP only")
wifi.setmode(wifi.SOFTAP)
elseif zmodewifi == wifi.STATION then
print("WIFI mode AP+CLI")
wifi.setmode(wifi.STATIONAP)
end
wifi.ap.config({ ssid = "NodeMCU "..wifi.ap.getmac(), pwd = "12345678" })
dofile("wifi_info.lua")
-- Démarre un WIFI AP
print("\wifi_ap_start.lua zf20180724.2220 \n")
wifi.setmode(wifi.SOFTAP)
wifi.ap.config({ ssid = "NodeMCU", pwd = "12345678" })
+15 -3
View File
@@ -1,7 +1,19 @@
-- Petit script pour démarrer le mode configuration WIFI du NodeMCU
print("\wifi_cnf_start.lua zf180822.1540 \n")
-- Enclenche le mode configuration WIFI
print("\nzf180718.1107\n")
function get_ip()
if wifi.sta.getip() == nil then
print("Connecting to AP...")
else
tmr.stop(0)
print("Connected! IP: ",wifi.sta.getip())
tmr.alarm(0,3000,tmr.ALARM_SINGLE, function() node.restart() end)
end
end
wifi.sta.disconnect()
wifi.sta.clearconfig()
print("\nwifi config http://192.168.4.1\n")
dofile("wifi_get_ip.lua")
tmr.alarm(0, 1000, tmr.ALARM_AUTO , get_ip)
enduser_setup.start()
+2 -4
View File
@@ -1,6 +1,4 @@
-- Petit script pour arrêter le mode configuration WIFI du NodeMCU
print("\wifi_cnf_stop.lua zf180822.1538 \n")
-- Déclenche le mode configuration WIFI
-- zf180713.1453
enduser_setup.stop()
wifi.sta.autoconnect(1)
wifi.sta.connect()
+2 -9
View File
@@ -1,11 +1,4 @@
-- Déconnecte le WIFI
-- zf180713.1453
print("\wifi_off.lua zf180822.0959 \n")
wifi.setmode(wifi.NULLMODE)
--[[
print(wifi.NULLMODE, wifi.STATION, wifi.SOFTAP, wifi.STATIONAP)
print(wifi.getmode())
]]
wifi.sta.disconnect()
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File