Plazter

Timer#2

Apr 29th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. t = 4 -- what you want your timer to be
  2. side = "left" -- edit this to the side u want
  3. monside = "" -- inden for "" skriver du hva side du vil ha monitor ved.
  4.  
  5. function timer()
  6. rs.setOutput(side, true)
  7. sleep(t)
  8. rs.setOutput(side, false)
  9. sleep(t)
  10. rs.setOutput(side, true)
  11. end
  12.  
  13. --function monitor() -- Fjern -- for at aktivere monitors
  14. --m = peripheral.wrap("monside")
  15. --m.setTextScale(0.5)
  16. --m.clear()
  17. --m.setCursorPos(1,1)
  18. --m.write(" Timer: ".. t)
  19. --end
  20.  
  21. while true do
  22. term.clear()
  23. term.setCursorPos(15,10)
  24. print(" timer is set to: ".. t)
  25. -- monitor() -- fjern -- for at aktivere monitor
  26. timer()
  27. end
Advertisement
Add Comment
Please, Sign In to add comment