Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap("left")
- local lib = require("internet")
- lib.enableNet()
- monitor.setTextScale(5) --8x5 screen
- monitor.clear()
- monitor.setTextColor(colors.orange)
- monitor.setCursorPos(1,1)
- monitor.write("^")
- monitor.setCursorPos(1,3)
- monitor.write("!")
- monitor.setCursorPos(4,1)
- monitor.write("#")
- monitor.setCursorPos(3,2)
- monitor.write("#")
- monitor.setCursorPos(4,3)
- monitor.write("#")
- monitor.setCursorPos(5,2)
- monitor.write("#")
- monitor.setCursorPos(1,5)
- monitor.write("<")
- monitor.setCursorPos(3,5)
- monitor.write(">")
- while true do
- local event, side, x, y = os.pullEvent("monitor_touch")
- if x==1 and y==1 then
- print("Sending turtle up")
- lib.sendMessage("turtle.digUp() turtle.up()")
- end
- if x==1 and y==3 then
- print("Sending turtle down")
- lib.sendMessage("turtle.digDown() turtle.down()")
- end
- if x==4 and y==1 then
- print("Sending turtle forward")
- lib.sendMessage("turtle.dig() turtle.forward()")
- end
- if x==4 and y==3 then
- print("Sending turtle forward")
- lib.sendMessage("turtle.back()")
- end
- if x==1 and y==5 then
- print("Sending turtle forward")
- lib.sendMessage("turtle.turnLeft()")
- end
- if x==3 and y==5 then
- print("Sending turtle forward")
- lib.sendMessage("turtle.turnRight()")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement