-- download at MT.QZX.COM (pulse-on-rising-edge.lua) -- sides: A=input - C=output pulse if event.iid == "pulse" then port.c = false elseif event.type == "on" and pin.a and not mem.s then if not mem.s then mem.s = not pin.a end interrupt(1, "pulse") port.c = true mem.s = pin.a elseif event.type == "off" and not pin.a and mem.s then mem.s = pin.a end