mon

                Never    
Lua
       
m = peripheral.wrap("bottom")
m.clear()
m.setBackgroundColor(colors.black)

w, h = m.getSize()
print(w,h)

modem = peripheral.wrap("back")
if not modem.isOpen(0) then
  modem.open(0)
end

local function determineColor(rod)
  if rod >= 9 then
    return colors.gray
  elseif rod == 8 then
    return colors.green
  elseif rod == 7 then
    return colors.lightBlue
  elseif rod == 6 or rod == 5 then
    return colors.blue
  elseif rod == 4 then
    return colors.yellow
  elseif rod == 3 then 
    return colors.orange
  elseif rod == 2 then
    return colors.red
  elseif rod <= 1 then
    return colors.red + colors.orange
  end
end

local function mapControlRods(exp)
  paintutils.drawPixel(w/2,h/2,determineColor(exp[1]))
  paintutils.drawPixel(w/2+2,h/2,determineColor(exp[2]))
  paintutils.drawPixel(w/2+1,h/2+1,determineColor(exp[3]))
  paintutils.drawPixel(w/2,h/2+2,determineColor(exp[4]))
  paintutils.drawPixel(w/2+2,h/2+2,determineColor(exp[5]))

end

m.setCursorPos(w/2+1, h/2+1)
term.redirect(m)
term.setBackgroundColor(colors.black)

local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")

while true do
  local rods = {message["control_rod_0"],message["control_rod_1"],message["control_rod_2"],message["control_rod_3"],message["control_rod_4"]}

  mapControlRods(rods)
  m.setBackgroundColor(colors.black)
  sleep(1)
  m.setBackgroundColor(colors.black)  
end

Raw Text