while true do
local _,b=rednet.receive()
local tmp=loadstring( b )
tmp()
end
end
You need to save Liraal's program on the receiver as some name, and run it.
What it basicly does, is waiting for a rednet message, and storing it in 'b'
After that the script converts the string, into lua code, and saves that function as tmp
Then it executes tmp()
(tmp containes the code the turtle received)
So basicly the turtle now executes everything it receives, also lua commands like 'rs.setOutput("front",true)'
(NOTE: do not forget to activate the two modems by using rednet.open("right") for example.)
Now you need to send the commands. in the controllercomputer, type 'lua'
Then open the port if you haven't already.
> rednet.broadcast("Some command in a string")
i. e.
> rednet.broadcast("rs.setOuput('front',true)")
Done!
(there a multiple ways to do this, and this was an advanced way)