kreezxil

redstone pulse clock using computercraft turtles

May 10th, 2026 (edited)
59
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | Gaming | 0 0
  1. print("Ctrl + T to terminate the program")
  2.  
  3. print("Which side should the turtle pulse?")
  4. print("Valid options: front, back, left, right, top, bottom")
  5. local side = read()
  6.  
  7. -- Validate input
  8. local validSides = {front=true, back=true, left=true, right=true, top=true, bottom=true}
  9.  
  10. if not validSides[side] then
  11.     print("Invalid side! Defaulting to 'front'")
  12.     side = "front"
  13. end
  14.  
  15. print("Redstone pulsing started on " .. side .. " side...")
  16.  
  17. while true do
  18.     redstone.setOutput(side, true)
  19.     sleep(0.1)
  20.     redstone.setOutput(side, false)
  21.     sleep(0.5)
  22. end
Advertisement
Comments
Add Comment
Please, Sign In to add comment