Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chanrec = 0
- modem = peripheral.wrap("bottom")
- sg = peripheral.wrap("top")
- while true do
- term.write("Ecoute sur le channel : "..chanrec)
- modem.open(chanrec)
- local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- if message == "open" then
- sg.openIris()
- sleep(2)
- elseif message == "close" then
- sg.closeIris()
- sleep(2)
- else
- sleep(0.5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement