Posted 29 August 2012 - 02:18 PM
A video of it in action.
[media]http://www.youtube.com/watch?v=l2IHyeYI-Ek&feature=plcp[/media]
the code:
[media]http://www.youtube.com/watch?v=l2IHyeYI-Ek&feature=plcp[/media]
the code:
mon = peripheral.wrap("left")
local x = rs.testBundledInput("right", colors.white)
while x ~= banana do
white = rs.testBundledInput("right", colors.white)
orange = rs.testBundledInput("right", colors.orange)
magenta = rs.testBundledInput("right", colors.magenta)
black = rs.testBundledInput("right", colors.black)
if white == true then
mon.setCursorPos(1,1)
mon.write(" ")
mon.setCursorPos(1,2)
mon.write(" *** Reactor Display Panel *** ")
mon.setCursorPos(1,3)
mon.write(" ")
mon.setCursorPos(1,4)
mon.write("-------------------------------------")
mon.setCursorPos(1,5)
mon.write(" Reactor Core 1 is OFF ")
else
mon.setCursorPos(1,1)
mon.write(" ")
mon.setCursorPos(1,2)
mon.write(" *** Reactor Display Panel *** ")
mon.setCursorPos(1,3)
mon.write(" ")
mon.setCursorPos(1,4)
mon.write("-------------------------------------")
mon.setCursorPos(1,5)
mon.write(" Reactor Core 1 is ON ")
end
if magenta == true then
mon.setCursorPos(1,6)
mon.write(" Reactor Core 2 is OFF ")
mon.setCursorPos(1,7)
mon.write("-------------------------------------")
else
mon.setCursorPos(1,6)
mon.write(" Reactor Core 2 is ON ")
mon.setCursorPos(1,7)
mon.write("-------------------------------------")
end
if orange == true then
mon.setCursorPos(1,8)
mon.write(" The reactor is OVERHEATING ")
else
mon.setCursorPos(1,8)
mon.write(" The reactor is at a safe temperature")
end
mon.setCursorPos(1,9)
mon.write("-------------------------------------")
if black == true then
mon.setCursorPos(1,10)
mon.write(" The Master Switch is set to OFF ")
else
mon.setCursorPos(1,10)
mon.write(" The master Switch is set to ON ")
end
mon.setCursorPos(1,11)
mon.write("-------------------------------------")
os.sleep(2)
end