#5 function reset() port.d = false port.c = false port.a = false interrupt(0.01, "play") end function play() t = mem.msg if(t ~= nil) then for i=1, #t do if(t[i] == 65) then port.d = not port.d elseif(t[i] == 66) then port.c = not port.c elseif(t[i] == 67) then port.a = not port.a end end end mem.msg = {} end if(event.type == "digiline" and event.channel == "ch_ABC") then mem.msg = event.msg reset() elseif(event.iid == "play") then play() end