Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- L = peripheral.wrap("left")
- R = peripheral.wrap("right")
- L.setChannel(1)
- R.setChannel(2)
- while true do
- term.setCursorPos(1,1)
- term.clear()
- print("TP "..string.char(27).." "..string.char(26))
- local e,k = os.pullEvent("key")
- if e=="key" and k==keys.left then
- print(string.char(27))
- R.send(1)
- elseif e=="key" and k==keys.right then
- print(string.char(26))
- L.send(2)
- elseif e=="key" and k==keys.t then
- printError("Terminated")
- break
- end
- sleep(.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement