-- download at MT.QZX.COM (dual-trigger-timer.lua) -- latches two inputs for time period -- time period is reset on each latch -- the two latched inputs are passed to two outputs local i1 = "a" local i2 = "b" local o1 = "d" local o2 = "c" local t = 15 -- seconds if event.type == "on" then if string.lower(event.pin.name) == i1 then port[o1] = true interrupt(t, "wait") elseif string.lower(event.pin.name) == i2 then port[o2] = true interrupt(t, "wait") end elseif event.iid == "wait" then port[o1] = false port[o2] = false end