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

Starting A Redstone Engine

Started by gareth305, 18 November 2013 - 03:26 PM
gareth305 #1
Posted 18 November 2013 - 04:26 PM
I want to create a program which will basically allow me to enter "start" and the redstone output will be set to true and the to have to type "stop" for the engines to stop. How would i do this with out restarting the computer?
Bomb Bloke #2
Posted 18 November 2013 - 05:20 PM
while true do
  print("Start or Stop?")
  myTask = read()

  if myTask:lower() == "start" then redstone.setOutput("back", true) end
  if myTask:lower() == "stop" then redstone.setOutput("back", false) end

  print("")
end
gareth305 #3
Posted 18 November 2013 - 05:44 PM
while true do
  print("Start or Stop?")
  myTask = read()

  if myTask:lower() == "start" then redstone.setOutput("back", true) end
  if myTask:lower() == "stop" then redstone.setOutput("back", false) end

  print("")
end

Thanks so much!