Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --update data from redstone channels (sensors)
- function UpdateSensors()
- RedstoneBottom = rs.getInput("bottom")
- RedstoneTop = rs.getInput("right")
- --
- if RedstoneBottom then
- rs.setOutput("left", true)
- elseif RedstoneTop then
- rs.setOutput("left", false)
- else
- --
- end
- end
- UpdateSensors()
- repeat
- event,p1,p2,p3 = os.pullEvent()
- if event=="redstone" then
- UpdateSensors()
- end
- until event=="char" and p1==("q")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement