diff --git a/Mesures/ADC/ADS1115/0_zdyndns.lua b/Mesures/ADC/ADS1115/0_zdyndns.lua new file mode 100644 index 0000000..f101ac4 --- /dev/null +++ b/Mesures/ADC/ADS1115/0_zdyndns.lua @@ -0,0 +1,32 @@ +-- Petit script pour s'inregistrer sur zdyndns + +function send_zdyndns() + if verbose then print("\n 0_zdyndns.lua zf200216.1822 \n") end + + zip = wifi.sta.getip() + zdyndns_str = "s "..node_id..","..console_host..":"..tostring(console_port).." "..zip + if verbose then print("zdyndns_str: "..zdyndns_str) end + + srv_zdyndns = net.createConnection(net.TCP, 0) + srv_zdyndns:on("connection", function(sck) + print("connected...") + print("sending...") + + sck:send(zdyndns_str, function(sk) + sk:close() + print("close...") + end) + + print("je ne sais pas quoi afire ici") + + end) + + srv_zdyndns:connect(console_port,console_host) + + zdyndns_str=nil zip=nil send_zdyndns=nil + if verbose then print(node.heap()) end + collectgarbage() + if verbose then print(node.heap()) end +end + +send_zdyndns() diff --git a/Mesures/ADC/ADS1115/_zremote_cmd.txt b/Mesures/ADC/ADS1115/_zremote_cmd.txt index 5b6de15..0fe200a 100644 --- a/Mesures/ADC/ADS1115/_zremote_cmd.txt +++ b/Mesures/ADC/ADS1115/_zremote_cmd.txt @@ -1,9 +1,10 @@ # Quelques commandes remote (luatool) à envoyer avec le plugin Atom-IDE-terminal de l'éditeur Atom -# zf200216.1656 +# zf200216.1702 Todo à faire pour ce projet ! +- regarder pour mettre "Welcome to NodeMCU world." quand connected, en fait quand on arrive dans le telnet_listener après la redirection du port série ! - ajouter l'adresse du zdyndns dans les secrets projets - se connecter sur le zdyndns avec le numéro du port du telnet reverse utilisé - y regarder pour faire tourner en MEME temps le reverse et le forward telnet diff --git a/Mesures/ADC/ADS1115/boot.lua b/Mesures/ADC/ADS1115/boot.lua index 517f6b7..c4864ab 100644 --- a/Mesures/ADC/ADS1115/boot.lua +++ b/Mesures/ADC/ADS1115/boot.lua @@ -1,6 +1,6 @@ -- Scripts à charger après le boot pour démarrer son projet -print("\n boot.lua zf200216.1650 \n") +print("\n boot.lua zf200216.1757 \n") function boot() verbose = true @@ -13,7 +13,7 @@ function boot() --f="0_cron.lua" if file.exists(f) then dofile(f) end f="0_btn_flipflop.lua" if file.exists(f) then dofile(f) end - f="0_tst3_socat.lua" if file.exists(f) then dofile(f) end + --f="0_tst3_socat.lua" if file.exists(f) then dofile(f) end --f = "web_ide2.lua" if file.exists(f) then dofile(f) end print("verbose:",verbose)