- mon btn_led_remote commence à bien marcher. Sauf que je dois encore le rendre autonome
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
-- Programme qui allume la led bleue quand on appuie le bouton flash
|
||||
-- zf181011.1749
|
||||
|
||||
print("\n btn_led_front.lua zf181011.1819 \n")
|
||||
print("\n btn_led.lua zf181011.2342 \n")
|
||||
|
||||
|
||||
zledbleue=0 --led bleue
|
||||
@@ -17,7 +17,8 @@ function zbtn()
|
||||
zled_state="OFF"
|
||||
gpio.write(zledbleue, gpio.HIGH)
|
||||
end
|
||||
print(zled_state)
|
||||
print("btn_led: "..zled_state)
|
||||
disp_send()
|
||||
end
|
||||
|
||||
gpio.trig(zswitch, "both", zbtn)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
-- Scripts à charger au moment du boot afin de pouvoir travailler avec le robot à distance
|
||||
print("\n start_boot.lua zf180907.1440 \n")
|
||||
print("\n start_boot.lua zf181011.2342 \n")
|
||||
|
||||
dofile("wifi_cli_conf.lua")
|
||||
dofile("wifi_cli_start.lua")
|
||||
dofile("web_led_onoff.lua")
|
||||
dofile("web_cli.lua")
|
||||
dofile("btn_led.lua")
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
-- Petit script pour envoyer quelque chose sur un serveur WEB
|
||||
print("\n web_cli.lua zf180828.1849 \n")
|
||||
print("\n web_cli.lua zf181011.2352 \n")
|
||||
|
||||
function disp_send()
|
||||
-- http.get("http://192.168.4.1/?line1="..zlength.."m", nil, function(code, data)
|
||||
print(zstate)
|
||||
http.get("http://192.168.0.177/?pin="..zstate, nil, function(code, data)
|
||||
print("web_cli: "..zled_state)
|
||||
http.get("http://192.168.0.122/?pin="..zled_state, nil, function(code, data)
|
||||
if (code < 0) then
|
||||
-- print("HTTP request failed")
|
||||
print("HTTP request failed")
|
||||
else
|
||||
-- print(code, data)
|
||||
print(code, data)
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Petit script pour configurer le client WIFI du NodeMCU
|
||||
print("\n wifi_cli_conf.lua zf180824.2000 \n")
|
||||
print("\n wifi_cli_conf.lua zf181011.2338 \n")
|
||||
|
||||
wifi.sta.config{ssid="3G-zf", pwd="12234567", save=true}
|
||||
wifi.sta.config{ssid="apzuzu6", pwd="12234567", save=true}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- Scripts à charger au moment du boot afin de pouvoir travailler avec le robot à distance
|
||||
print("\n start_boot.lua zf180907.1440 \n")
|
||||
print("\n start_boot.lua zf181011.2338 \n")
|
||||
|
||||
dofile("wifi_cli_conf.lua")
|
||||
dofile("wifi_cli_start.lua")
|
||||
4
Workshop/181015/btn_led_remote/led/wifi_cli_conf.lua
Normal file
4
Workshop/181015/btn_led_remote/led/wifi_cli_conf.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
-- Petit script pour configurer le client WIFI du NodeMCU
|
||||
print("\n wifi_cli_conf.lua zf181011.2338 \n")
|
||||
|
||||
wifi.sta.config{ssid="apzuzu6", pwd="12234567", save=true}
|
||||
@@ -1,4 +0,0 @@
|
||||
-- Petit script pour configurer le client WIFI du NodeMCU
|
||||
print("\n wifi_cli_conf.lua zf180824.2000 \n")
|
||||
|
||||
wifi.sta.config{ssid="3G-zf", pwd="12234567", save=true}
|
||||
Reference in New Issue
Block a user