-- download at MT.QZX.COM (pulse-off-timer.lua) -- output is on until a pulse is received on input -- then output turns off for 60s -- off timer is restarted if another pulse arrives while off local o = "a" -- output local i = "c" -- pulse local tl = 60 -- off for 60s after pulse if event.iid == "hi" then port[o] = true elseif event.type == "on" and pin[i] then port[o] = false interrupt(tl, "hi") end