Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #8
- 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] == 74) then
- port.d = true
- elseif(t[i] == 75) then
- port.c = true
- elseif(t[i] == 76) then
- port.a = true
- end
- end
- end
- mem.msg = {}
- end
- if(event.type == "digiline" and event.channel == "ch_JKL") then
- mem.msg = event.msg
- reset()
- elseif(event.iid == "play") then
- play()
- end
Add Comment
Please, Sign In to add comment