Commencé le projet pet_tracker_2, une nouvelle évolution avec mes nouveaux outils de l'ancien pet-tracker

This commit is contained in:
Christian Zufferey
2020-07-20 19:19:33 +02:00
parent 6570ab5287
commit 767333aa36
28 changed files with 2081 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
-- Scripts pour régler l'horloge quand on est connecté en WIFI
print("\n set_time.lua zf181212.0841 \n")
--f= "wifi_ap_stop.lua" if file.exists(f) then dofile(f) end
--f= "wifi_cli_conf.lua" if file.exists(f) then dofile(f) end
--f= "wifi_cli_start.lua" if file.exists(f) then dofile(f) end
--f= "telnet_srv.lua" if file.exists(f) then dofile(f) end
--f= "web_ide2.lua" if file.exists(f) then dofile(f) end
--f= "dsleep.lua" if file.exists(f) then dofile(f) end
function set_time()
sntp.sync(nil, nil, nil, 1)
end
function ztime()
tm = rtctime.epoch2cal(rtctime.get()+3600)
print(string.format("%04d/%02d/%02d %02d:%02d:%02d", tm["year"], tm["mon"], tm["day"], tm["hour"], tm["min"], tm["sec"]))
end
set_time()