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