Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.find("modem")
- rednet.open("left")
- io.write("Input HUB ID: ")
- local hubID = tonumber(read())
- rednet.send(hubID, "connectMsg")
- local id, message = rednet.receive()
- if message == "connectSuccess" then
- print("Connected to HUB." )
- else
- print("ERROR: Check HUB ID is correct.")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement