View difference between Paste ID: wfga7Ny9 and qeS9HU6h
SHOW: | | - or go back to the newest paste.
1-
local oxymon = peripheral.wrap("back")
1+
--Monitor side ("front", "back", "left", "right", "top" or "bottom")
2
local cmon = peripheral.wrap("top")
3
4-
  if rs.getInput("left") then
4+
--Start on or off? (0=off, 1=on)
5-
    oxymon.setCursorPos(3,7)
5+
local state = 0
6-
    oxymon.setBackgroundColor(colors.blue)
6+
7-
    oxymon.clear()
7+
	if state==1 then
8-
    oxymon.write("Oxygen Present")
8+
--Colour of the light ("white", "orange", "magenta", "lightBlue", "yellow", "lime", "pink", "gray", "lightGray", "cyan", "purple", "blue", "brown", "green", "red", "black")
9-
  else
9+
		cmon.setBackgroundColor(colors.white)
10-
    oxymon.setCursorPos(7,6)
10+
-- Do not change anything below this line
11-
    oxymon.setBackgroundColor(colors.red)
11+
		cmon.clear()
12-
    oxymon.clear()
12+
	else
13-
    oxymon.write("Oxygen")
13+
		cmon.setBackgroundColor(colors.black)
14-
    oxymon.setCursorPos(4,7)
14+
		cmon.clear()
15-
    oxymon.write("Decompression")
15+
	end
16-
  end
16+
	event, side, x,y = os.pullEvent()
17-
  os.pullEvent("redstone")
17+
	if event == "monitor_touch" then
18
		state = (state + 1) % 2
19
	end
20
end