Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Computer Program
- -- Set the modem to the same channel as the receiver
- local channel = 123 -- Change this to the same channel as the receiver
- rednet.open("left") -- Assuming the modem is on the left side
- -- Send a location request message to the receiver
- rednet.send(receiverId, "location_request", channel) -- Replace receiverId with the ID of the computer with the receiver
- -- Wait for the response from the receiver
- local senderId, location = rednet.receive(channel)
- -- Display the location received from the receiver
- print(location)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement