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

while true do

local id, message = rednet.receive()

if message == "one" and id == 6 then
 rs.setOutput("left", true)
 sleep(.2)
 rs.setOutput("left", false)
-- rs.setOutput("bottom", false)
end

if message == "rap" and id == 6 then
a = 0
while a < 20 do
 rs.setOutput("left", true)
 sleep(.2)
 rs.setOutput("left", false)
 sleep(.2)
 a = a + 1
 end
-- rs.setOutput("bottom", false)
end


end
