Advertisement
1ng0

ComputerCraft Leuchtturm

Sep 22nd, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. --> www.youtube.com/watch?v=t_yk7IjiKOY <--
  2. -- Leuchtturm (Sequencer) - v.0.3 by ©redled72 12/2012
  3. local inp     = "top"       -- ON/Off Switch
  4. local sens    = "bottom"    -- Night Sensor
  5. local p       = 1.0         -- OnTime pro Schritt (seconds)
  6.  
  7. rotate = {"left", "back", "right", "front"}
  8.            
  9. while true do
  10.       while rs.getInput(inp) == true and rs.getInput(sens) == true do
  11.             for i = 1, #rotate, 1 do
  12.                 rs.setOutput(rotate[i], true)
  13.                 sleep(p)
  14.                 rs.setOutput(rotate[i], false)
  15.             end
  16.       end
  17.       for i = 1, #rotate, 1 do
  18.           rs.setOutput(rotate[i], false)
  19.       end
  20.       sleep(0.8)
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement