Client (program on the turtle) :
while true do
rednet.open("right")
x,y,z=rednet.receive()
print(y)
shell.run(y)
end
Server (program on the computer) :
while true do
write"Command: "
input = read()
rednet.open("top")
rednet.broadcast(input)
end
Posted 02 September 2012 - 03:07 AM
while true do
rednet.open("right")
x,y,z=rednet.receive()
print(y)
shell.run(y)
end
while true do
write"Command: "
input = read()
rednet.open("top")
rednet.broadcast(input)
end
Posted 02 September 2012 - 03:11 AM
Posted 02 September 2012 - 03:13 AM
Posted 02 September 2012 - 03:18 AM
Posted 02 September 2012 - 03:23 AM
Posted 02 September 2012 - 03:38 AM
id = 17 --replace with id of your turtle
rednet.open("right")
print("what program do you want to run?")
program = io.read()
rednet.send(id, program)
code for turtlerednet.open("right")
while true do
local x, y, z = rednet.recive(timeout)
shell.run(y)
end
Posted 02 September 2012 - 03:39 AM
Posted 02 September 2012 - 04:44 AM
dcleondc, on 02 September 2012 - 03:38 AM, said:
id = 17 --replace with id of your turtle
rednet.open("right")
print("what program do you want to run?")
program = io.read()
rednet.send(id, program)
code for turtlerednet.open("right")
while true do
local x, y, z = rednet.recive(timeout)
shell.run(y)
end
Posted 02 September 2012 - 05:12 AM
Posted 02 September 2012 - 05:38 AM
id = 17
rednet.open("right")
print("what program do you want to run")
program = io.read()
print("what arg do you want to send")
arg = io.read()
rednet.send(id, program)
rednet.send(id, arg)
shell.run("startup")
turtlerednet.open("right")
while true do
local x, y, z = rednet.receive(timeout)
local x, y, z = rednet.receive(timeout)
shell.run(y,a)
end
Posted 02 September 2012 - 01:37 PM
0 members, 1 guests, 0 anonymous users