Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("front")
- mon.clear()
- mon.setTextScale(5)
- mon.setCursorPos(1,1)
- mon.write("DACH")
- mon.setCursorPos(1,4)
- mon.write("RAMPE")
- while true do
- event,side,x,y = os.pullEvent("monitor_touch")
- if x > 1 and x < 5 and y == 1 then
- rs.setOutput("left",true)
- mon.setCursorPos(1,1)
- mon.clearLine()
- mon.blit("DACH","0000","dddd")
- sleep(2)
- rs.setOutput("left",false)
- mon.setCursorPos(1,1)
- mon.clearLine()
- mon.blit("DACH","0000","eeee")
- elseif x > 1 and x < 6 and y == 4 then
- rs.setOutput("right",true)
- mon.setCursorPos(1,4)
- mon.clearLine()
- mon.blit("RAMPE","00000","ddddd")
- sleep(2)
- rs.setOutput("right",false)
- mon.setCursorPos(1,4)
- mon.clearLine()
- mon.blit("RAMPE","00000","eeeee")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement