Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local idChannel = 125
- function close()
- rs.setOutput("top", false)
- end
- function open()
- rs.setOutput("top", true)
- end
- function side()
- rs.setOutput("left", true)
- sleep(0.2)
- rs.setOutput("left", false)
- end
- modem = peripheral.wrap("bottom")
- open()
- sleep(0.1)
- close()
- while true do
- modem.open(idChannel)
- event, modemSide, senderChannel, replyChannel, text, senderDistance = os.pullEvent("modem_message")
- if text == "open" then
- open()
- elseif text == "close" then
- close()
- elseif text == "side" then
- side()
- end
- modem.close(idChannel)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement