View difference between Paste ID: Npk77chZ and AaZbbzUp
SHOW: | | - or go back to the newest paste.
1
local modemSide = "back" 
2
local monitor = peripheral.wrap("left")
3
4
rednet.open(modemSide)
5
6
local function formatEMCValue(emc)
7
  local billion = emc / 1000000000 
8
  return string.format("%.2fB", billion)
9
end
10
11
while true do
12
  local senderID, message = rednet.receive()
13
  
14
  monitor.clear()
15
  monitor.setBackgroundColor(colors.black)
16
  monitor.setTextColor(colors.red)
17
  monitor.setCursorPos(1, 1)
18
  monitor.write("Chest Contents")
19
  monitor.setCursorPos(1, 2)
20
  monitor.write("EMC: " .. formatEMCValue(tonumber(message)))
21
end
22