Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Example code for sending commands from another computer
- rednet.open("top") -- Open the Rednet modem
- local id = rednet.lookup("turtle") -- Find the turtle's ID by its name (optional)
- while true do
- print("Enter command (forward, backward, left, right, load, exit): ")
- local command = read()
- -- Send the command to the turtle
- rednet.send(id, command)
- if command == "exit" then
- break -- Exit the sending loop
- end
- end
- rednet.close("top")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement