Posted 05 November 2015 - 11:24 PM
Here's my setup. Basically, I have two computers, the first is connected to a redstone input, the second to a monitor.
When the first receives a redstone signal it sends a redstone signal, as well as a rednet message to the second computer.
When the second computer receives the message it displays a message on the monitor.
At least, in theory.
Both computers are connected via networking cable and activated wired-modems, so I see no reason why this shouldn't be working.
These programs have no errors, so I don't know where the problem is. But I believe it's most likely in the communication, either the first is not sending, or the second is not receiving.
Here are the codes of the two computers.
First Computer (sender)
Second Computer (Receiver)
When the first receives a redstone signal it sends a redstone signal, as well as a rednet message to the second computer.
When the second computer receives the message it displays a message on the monitor.
At least, in theory.
Both computers are connected via networking cable and activated wired-modems, so I see no reason why this shouldn't be working.
These programs have no errors, so I don't know where the problem is. But I believe it's most likely in the communication, either the first is not sending, or the second is not receiving.
Here are the codes of the two computers.
First Computer (sender)
rednet.open("left")
while true do
if redstone.getInput("right") then
rednet.broadcast("GenOn") else
rednet.broadcast("GenOff")
end
while true do
redstone.setOutput("back", not redstone.getInput("right"))
os.pullEvent("redstone")
end
end
Second Computer (Receiver)
monl = peripheral.wrap("left")
monr = peripheral.wrap("right")
mont = peripheral.wrap("top")
monl.setCursorPos(1,1)
monl.write("==RFG==")
rednet.open("back")
while true do
id, msg = rednet.receive()
if msg == "GenOn" then
monl.clear()
monl.setCursorPos(1,2)
monl.write("Online") else
monl.write("Offline")
end
end
Edited on 05 November 2015 - 10:25 PM