Posted 18 October 2013 - 02:22 PM
Hi, I have recently been learning how to use RedNet and I can use it correctly I believe. However, when I try to send a signal from a computer to a turtle to toggle a redstone signal, it doesn't work how I want. At the moment, if I send the signal, the turtle turns the redstone on, but not off after sending it again. However, if I tell the turtle to do it through a program without RedNet, it works perfectly. Here is my code:
Startup:
http://pastebin.com/xm3bpB94
http://pastebin.com/fs0pgLkz
I know I don't particularly need to put "test" into it's own program, but I have tried to do it implemented into "startup". Any help in this matter would be greatly appreciated. Many thanks, Tom.
Startup:
http://pastebin.com/xm3bpB94
rednet.open("right")
a,b,c = rednet.receive()
if b == "test" then
shell.run("test")
print("Running test!")
end
Test:http://pastebin.com/fs0pgLkz
if rs.getInput("back",true) then
rs.setOutput("back",false)
else
rs.setOutput("back",true)
end
I know I don't particularly need to put "test" into it's own program, but I have tried to do it implemented into "startup". Any help in this matter would be greatly appreciated. Many thanks, Tom.