Posted 30 November 2012 - 07:25 AM
Can someone adapt this code to work with ribbon cable?
os.pullEvent = os.pullEventRaw
print 'Reactor Tempature Monitoring System'
while true do
blackin = rs.testBundledInput("back", colors.black)
redin = rs.testBundledInput("back", colors.black)
yellowin = rs.testBundledInput("back", colors.yellow)
bluein = rs.testBundledInput("back", colors.blue)
if blackin = true then
rs.setBundledOutput("back", colors.brown)
print 'Reactor Is Off'
if redin = true then
rs.setBundledOutput("back", colors.orange)
print 'Reactor Tempature At 3000'
if yellowin = true then
rs.setBundledInput("back", colors.green)
print 'Reactor Tempature At 5000"
if bluein = true then
rs.setOutput("left", true)
print 'Reactor Tempature Critical!'
if blackin == false then
rs.setBundledOutput("brown", 0)
if redin == false then
rs.setBundledOutput("orange", 0)
if yellowin == false then
rs.setBundledOutput("green", 0)
if bluein == false then
rs.setBundledOutput("purple", 0)
end
sleep(.1)
end