Posted 21 April 2014 - 06:06 PM
Hello everyone.
Is it possible to have a redstone output on 2 sides the same moment?
For example the code below.
When the reactor turns online it sends a signal up (to turn on the reactor)
But I also want a output on the bottom the same moment.
I wonder if thats possible.
Is it possible to have a redstone output on 2 sides the same moment?
For example the code below.
When the reactor turns online it sends a signal up (to turn on the reactor)
But I also want a output on the bottom the same moment.
I wonder if thats possible.
rednet.open("bottom") -- set rednet side
console = 314 -- enter ID of computer attached to the touch screen
nir = 313 -- enter ID of computer attached to the Nuclear information reader
maxTemp = 5000
temp = 1000
rctrStatus = "off"
while true do
a,b = rednet.receive()
if a == console then
if b == "on" then
rs.setOutput("top", true)
rctrStatus = "on"
break
elseif b == "off" then
break
end
end
end
while true do
if temp >= maxTemp then
rs.setOutput("top", false)
-- elseif temp >= 7500 then
-- rs.setOutput("back" ,false)
end
a,b = rednet.receive()
if a == nir then
temp = tonumber(B)/>
elseif a == console then
if b == "maxTemp" then
rednet.send(console, "ping")
id, message = rednet.receive()
message = tonumber(message)
--if message < 7500 and
if id == console then
maxTemp = message
rednet.send(console, "true")
else
rednet.send(console, "false")
end
elseif b == "on" then
if temp < maxTemp then
rs.setOutput("top", true)
rednet.send(console, "true")
rctrStatus = "on"
print("On received")
else
rednet.send(console, "false")
end
elseif b == "off" then
rs.setOutput("top", false)
rednet.send(console, "true")
rctrStatus ="Off"
end
end
end