Advertisement
NanoBob

redstone pulser

Sep 14th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. sides={
  2. "left",
  3. "right",
  4. }
  5.  
  6. ID=os.getComputerID()
  7.  
  8. rednet.open("top")
  9. for id,side in ipairs(sides) do
  10.     redstone.setOutput(side,false)
  11. end
  12. while true do
  13.     id,message=rednet.receive()
  14.         print(id..","..message)
  15.     if message=="open"..ID then
  16.         for id,side in ipairs(sides) do
  17.             redstone.setOutput(side,true)
  18.                         sleep(2)
  19.             redstone.setOutput(side,false)
  20.         end
  21.     end
  22. end
  23.  
  24.  
  25. -- 45,48
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement