Guest User

Untitled

a guest
Dec 14th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. os.run( {}, "rom/programs/clear" )
  2. print ( "Running SOS Beacon..." )
  3.  
  4. -- Put a sticky piston with something bright on top
  5. local sSide = "top"
  6. local nCount = 3
  7. local nPeriod = 1
  8.  
  9. -- Redstone from the left will halt execution
  10. while redstone.getInput( "left" ) ~= true do
  11. -- S:
  12. os.run( {}, "rom/programs/redpulse",
  13. "top", nCount, nPeriod )
  14.  
  15. -- O: not a pulse as such
  16. for n=1,nCount do
  17. redstone.setOutput( sSide, true )
  18. sleep( nPeriod*2 )
  19. redstone.setOutput( sSide, false )
  20. sleep( nPeriod )
  21. end
  22.  
  23. -- S:
  24. os.run( {}, "rom/programs/redpulse",
  25. "top", nCount, nPeriod )
  26. end
  27.  
  28. print ( "Redstone execution halt signal detected." )
Add Comment
Please, Sign In to add comment