Posted 22 November 2013 - 04:34 AM
Hey guys's im new to computercraft and ive been playing around with for about 13 hours now, haven't slept.
So here is my problem if you guys can help, i'm trying to have a readout mointer that shows when my reactors are on or off and which also shows if the temperature is above 2000 which enables the controls rods. but i cant get both readouts on the screen at the same time.
So here is my problem if you guys can help, i'm trying to have a readout mointer that shows when my reactors are on or off and which also shows if the temperature is above 2000 which enables the controls rods. but i cant get both readouts on the screen at the same time.
local monitor = peripheral.wrap("left")
term.redirect(monitor)
function write()
print("Reactor Building One")
print()
end
local function reactorOneStatus()
os.pullEvent("redstone")
state = rs.testBundledInput("back", colors.white)
if state then
term.setCursorPos(1,3)
term.clearLine()
print()
print("Rector one : ON ")
elseif not state then
term.setCursorPos(1,3)
term.clearLine()
print()
print("Rector one : OFF")
end
end
local function reactorOneTempStatus()
print("test parallel")
os.pullEvent("redstone")
state = rs.testBundledInput("back", colors.white)
if state then
term.setCursorPos(1,5)
print()
print("Rector Temp : fail safe")
elseif not state then
term.setCursorPos(1,5)
print()
print("Rector Temp : OK")
end
end
write()
while true do
parallel.waitForAny(reactorOneStatus, reactorOneTempStatus)
end
reactorOneStatus()
reactorOneTempStatus()