Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- front = rs.getInput("Front")
- left = rs.getInput("Left")
- function XORSwitches(a, b)
- if (a and b) then
- return false
- elseif (a or b) then
- return true
- else
- return false
- end
- end
- while (true) do
- os.pullEvent("redstone")
- front = rs.getInput("Front")
- left = rs.getInput("Left")
- state = XORSwitches(front, left)
- if (state) then
- rednet.broadcast("closeDoor")
- else
- rednet.broadcast("openDoor")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement