Quipex

Disk/mem/redworks/programs/circuits/Pulse-Former

Apr 23rd, 2012
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. --1
  2. --1
  3. --0
  4. input = {}
  5. output = {}
  6. extra = {}
  7. input[1] = "left"
  8. output[1] = "back"
  9.  
  10. -- Pulse Former
  11. -- Created by: FuzzyPurp
  12.  
  13. local rRunning = true
  14. term.clear()
  15. term.setCursorPos(1,2)
  16. print("Pulse Former is now running.")
  17. print("Input(s): " .. input[1] .. ".")
  18. print("Output(s): " .. output[1] .. ".")
  19. print("\nHold Control+T to terminate.")
  20.  
  21. while rRunning do
  22. sleep(0.1)
  23.  
  24. local rEvent, param = os.pullEvent()
  25. if rEvent == "redstone" then
  26. if rs.getInput(input[1]) then
  27. rs.setOutput(output[1], true)
  28. sleep(0.2)
  29. rs.setOutput(output[1], false)
  30. end
  31. end
  32. end
Add Comment
Please, Sign In to add comment