This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
esp8266-temperature/lua-sensor/init.lua

11 lines
271 B
Lua

FileToExecute="user.lua"
l = file.list()
for k,v in pairs(l) do
if k == FileToExecute then
print("*** You've got 5 sec to stop timer ***")
tmr.alarm(0, 5000, 0, function()
print("Executing ".. FileToExecute)
dofile(FileToExecute)
end)
end
end