Erm. Problem. I'm not sure I'm doing this right, 'cause nothing happens. Can you check over my stuff for me? The 'receiver' unit.
redstone.setOutput("back", false)
redstone.setOutput("left", false)
redstone.setOutput("right", false)
redstone.setOutput("top", false) -- clearing all the junk in case
shell.run("down")
shell.run("close") -- reset to base status
rednet.open("bottom")
while true do -- Infinite loop to receive the message
local senderId, message, protocol = rednet.receive()
if message == "Open" then
shell.run("open")
shell.run("up")
elseif message == "Close" then
shell.run("down")
shell.run("close")
elseif message == "Reset" then
shell.run("clearall")
end
end
And the transmitter.
rednet.open("back")
while true do
term.clear()
term.setCursorPos(1,1)
print("Vault Lift Control (01)")
term.setCursorPos(1,2)
print("Enter Command:")
term.setCursorPos(1,3)
print("[O]pen, [C]lose, [R]eset")
term.setCursorPos(1,5)
input = read()
if input == "O" then
rednet.send(2,Open)
elseif input == "o" then
rednet.send(2,Open)
elseif input == "Open" then
rednet.send(2,Open)
elseif input == "open" then
rednet.send(2,Open)
elseif input == "C" then
rednet.send(2,Close)
elseif input == "c" then
rednet.send(2,Close)
elseif input == "Close" then
rednet.send(2,Close)
elseif input == "close" then
rednet.send(2,Close)
elseif input == "R" then
rednet.send(2,Reset)
elseif input == "r" then
rednet.send(2,Reset)
elseif input == "Reset" then
rednet.send(2,Reset)
elseif input == "reset" then
rednet.send(2,Reset)
else
term.setCursorPos(1,6)
print("Syntax Error")
sleep(3)
end
sleep(2)
end
What'd I break? I get no errors- just no response. The receiver is ID'd as #2.