Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("left")
- print("opened connection")
- rednet.send(12, "opengate001")
- id, message = rednet.receive()
- if id == 12 and message == "gaterec001" then
- print("Opening gate")
- elseif id == 12 and message == "gaterec002" then
- print("Closing gate")
- else
- print("Error #1, no message received")
- end
- rednet.close("left")
- print("closed connection")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement