2 posts
Posted 16 September 2012 - 09:00 PM
I have a turtle that is part of a more complex machine, and I want to start a program saved in the turtle from a computer in a close area. How would I program this?
Thank You.
8543 posts
Posted 16 September 2012 - 09:12 PM
To answer both questions in the title of your post:
It is possible to boot a computer/turtle from another computer/turtle touching it (the combination of turtle and computer is irrelevant), using the peripheral API.
It is possible to use rednet to instruct a remote computer to run a program, so long as the remote computer is running a program that is designed to accept rednet packets and run programs based on their contents. There is at least one tutorial in the Tutorials section and several complete programs in the Programs section, as well as the Turtle Programs subsection.
113 posts
Posted 17 September 2012 - 04:50 AM
I haven't tested this, but it should work.
--Put this into sender
print("Enter ID of sender: ")
id = read()
print("What would you like to send: ")
msg = read()
rednet.send(id, msg)
end
--Put this into receiver
id, msg = rednet.receive()
print(msg)
if msg == "runClear" then
shell.run("clear")
end