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

how to start a program using a redstone signal

Started by mikepotato, 01 July 2016 - 01:22 PM
mikepotato #1
Posted 01 July 2016 - 03:22 PM
How do i start a program using a redstone signal?
for example: there is a redstone wire on the back side of the computer, and i want a program to run when that wire is on, how do i do that?
Luca_S #2
Posted 01 July 2016 - 07:28 PM
you can use the redstone api

e.g.

while not rs.getInput("back") do
  os.pullEvent("redstone") --redstone even sends an event
end
shell.run("hello")