sleep(.5)
m = peripheral.wrap("top")
rednet.open("back")
m.setBackgroundColor(colors.red)
m.clear()
m.setTextColor(colors.yellow)
m.setTextScale(1)
m.setCursorPos(3,2)
m.write("REMOTE CONTROL INTERFACE")
term.redirect(m)
image = paintutils.loadImage("rem.nfp")
paintutils.drawImage(image,4,1)

while true do

local id, message = rednet.receive()

if message == "nor" and id == 6 then
 rs.setOutput("right", true)
 rs.setOutput("left", false)
 rs.setOutput("bottom", false)
end

if message == "red" and id == 6 then
 rs.setOutput("right", false)
 rs.setOutput("left", true)
 rs.setOutput("bottom", false)
end

if message == "ale" and id == 6 then
 rs.setOutput("right", false)
 rs.setOutput("left", true)
 rs.setOutput("bottom", true)
end

if message == "off" and id == 6 then
 rs.setOutput("right", false)
 rs.setOutput("left", false)
 rs.setOutput("bottom", false)
end

end
