wip
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
-- Petit script pour envoyer quelque chose sur un serveur WEB
|
||||
print("\n web_cli.lua zf181015.1625 \n")
|
||||
print("\n web_cli.lua zf190808.1605 \n")
|
||||
|
||||
function disp_send()
|
||||
-- http.get("http://192.168.4.1/?line1="..zlength.."m", nil, function(code, data)
|
||||
print("web_cli: "..zled_state)
|
||||
http.get("http://192.168.4.1/?pin="..zled_state, nil, function(code, data)
|
||||
http.get("http://192.168.43.158/?pin="..zled_state, nil, function(code, data)
|
||||
if (code < 0) then
|
||||
print("HTTP request failed")
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- Petit script pour configurer le client WIFI du NodeMCU
|
||||
print("\n wifi_cli_conf.lua zf181015.1624 \n")
|
||||
print("\n wifi_cli_conf.lua zf190808.1559 \n")
|
||||
|
||||
wifi.sta.config{ssid="NodeMCU btn 3a:2b:78:04:2d:2d", pwd="12345678", save=true}
|
||||
wifi.sta.config{ssid="3g-s7", pwd="12234567", save=true}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
-- Petit script pour obtenir l'adresse IP du NodeMCU connecté sur un AP Wifi
|
||||
print("\n wifi_get_ip.lua zf180824.2000 \n")
|
||||
print("\n wifi_get_ip.lua zf190808.1600 \n")
|
||||
|
||||
wifitimer1=tmr.create()
|
||||
tmr.alarm(wifitimer1, 1000, tmr.ALARM_AUTO , function()
|
||||
wifitimer1:alarm(1000, tmr.ALARM_AUTO , function()
|
||||
if wifi.sta.getip() == nil then
|
||||
print("Connecting to AP...")
|
||||
else
|
||||
tmr.stop(wifitimer1)
|
||||
wifitimer1:stop()
|
||||
dofile("wifi_info.lua")
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user