Posted 25 October 2012 - 06:03 PM
Hi everybody
I've played around with rednet a little bit and wrote a little program, which doesn't work correctly.. Here is what it should do:
If it gets the command, it should extend a pisten and with another command it should retract it
Now here's the problem: It only extends and does not retract… here's the code of my receiver computer(id4)
rednet.open("left")
while true do
os.pullEvent()
id,message = rednet.receive()
if message == "on" then
rs.setOutput("back", true)
end
if message == "off" then
rs.setOutput("back", false)
end
end
what is wrong/missing there? I would be glad if someone could help me
I've played around with rednet a little bit and wrote a little program, which doesn't work correctly.. Here is what it should do:
If it gets the command, it should extend a pisten and with another command it should retract it
Now here's the problem: It only extends and does not retract… here's the code of my receiver computer(id4)
rednet.open("left")
while true do
os.pullEvent()
id,message = rednet.receive()
if message == "on" then
rs.setOutput("back", true)
end
if message == "off" then
rs.setOutput("back", false)
end
end
what is wrong/missing there? I would be glad if someone could help me