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

How to Detect Redstone signals

Started by Pedroc1999, 30 October 2012 - 10:19 PM
Pedroc1999 #1
Posted 30 October 2012 - 11:19 PM
I am making a control/server room and would like to receive a signal from my door, so i want my computer to detect the redstone signal and then write a message on the screen like ' door locked' or if there is no signal being received write 'door unlocked'
PixelToast #2
Posted 31 October 2012 - 12:39 AM

while true do
   shell.run("clear")
   if rs.getInput("side") then
      print("redstone ON")
   else
      print("redstone OFF")
   end
   os.pullEvent("redstone")
end