Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("right")
- local x,y = mon.getSize()
- function paint()
- print(x)
- print(y)
- for i=1,y do
- mon.setBackgroundColor(colors.blue)
- mon.setCursorPos(1,i)
- mon.write(" ")
- mon.setCursorPos(71,i)
- mon.write(" ")
- --print(i)
- end
- for i=1,71 do
- mon.setCursorPos(i,1)
- mon.write(" ")
- mon.setCursorPos(i,26)
- mon.write(" ")
- mon.setCursorPos(i,5)
- mon.write(" ")
- end
- end
- function writer()
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- mon.setCursorPos(32,3)
- mon.write("Energie")
- mon.setCursorPos(3,7)
- mon.write("Consomation de la base : ")
- mon.setCursorPos(3,9)
- mon.write("Consomation de l'applied : ")
- end
- mon.setBackgroundColor(colors.black)
- mon.clear()
- paint()
- writer()
- rednet.open("left")
- while true do
- --paint()
- local event , id , msg ,proto = os.pullEvent("rednet_message")
- if (id == 7) then
- mon.setCursorPos(28,7)
- mon.write(msg.." RF/ticks ")
- elseif (id == 8) then
- mon.setCursorPos(30,9)
- mon.write(msg.." RF/ticks ")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement