Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. mon = peripheral.wrap("front")
  2. mon.clear()
  3. mon.setTextScale(5)
  4.  
  5. mon.setCursorPos(1,1)
  6. mon.write("DACH")
  7. mon.setCursorPos(1,4)
  8. mon.write("RAMPE")
  9.  
  10. while true do
  11. event,side,x,y = os.pullEvent("monitor_touch")
  12.  
  13. if x > 1 and x < 5 and y == 1 then
  14. rs.setOutput("left",true)
  15. mon.setCursorPos(1,1)
  16. mon.clearLine()
  17. mon.blit("DACH","0000","dddd")
  18. sleep(2)
  19. rs.setOutput("left",false)
  20. mon.setCursorPos(1,1)
  21. mon.clearLine()
  22. mon.blit("DACH","0000","eeee")
  23.  
  24. elseif x > 1 and x < 6 and y == 4 then
  25. rs.setOutput("right",true)
  26. mon.setCursorPos(1,4)
  27. mon.clearLine()
  28. mon.blit("RAMPE","00000","ddddd")
  29. sleep(2)
  30. rs.setOutput("right",false)
  31. mon.setCursorPos(1,4)
  32. mon.clearLine()
  33. mon.blit("RAMPE","00000","eeeee")
  34.  
  35. end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement