This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
rob24915's profile picture

Operate computers with redstone input

Started by rob24915, 28 December 2012 - 09:16 AM
rob24915 #1
Posted 28 December 2012 - 10:16 AM
Hello all, I'm currently using a simple redstone output timer program to run my quarry engines and would like to start and stop the program with a redstone input. I think I know how to make a program run via redstone input with os.pullevent, but how do I make it stop when the red signal stops. My program is repeat until nil which means I must control+S to stop it. I believe that I also need a startup program so the computer is ready to receive an input. Any thoughts or knowledge on the subject would be quite appreciated.
XoX #2
Posted 28 December 2012 - 10:35 AM
If it's already in a loop just do

while rs.getInput("side") do

Edit: In your case.



repeat
until not rs.getInput("side")
rob24915 #3
Posted 28 December 2012 - 11:44 AM
Right on, just what I needed. Thanks a ton.