Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("left")
- A = colors.black
- B = colors.black
- C = colors.black
- D = colors.black
- function draw()
- print("LOADING...")
- m.setTextScale(3)
- m.clear()
- --LICHT
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.white)
- m.setCursorPos(1,1)
- m.write("Licht")
- m.setBackgroundColor(colors.green)
- m.setTextColor(colors.lime)
- m.setCursorPos(10,1)
- m.write("an")
- m.setTextColor(colors.orange)
- m.setBackgroundColor(colors.red)
- m.setCursorPos(13,1)
- m.write("aus")
- --MONITORE
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.white)
- m.setCursorPos(1,2)
- m.write("Monitore")
- m.setBackgroundColor(colors.green)
- m.setTextColor(colors.lime)
- m.setCursorPos(10,2)
- m.write("an")
- m.setBackgroundColor(colors.red)
- m.setTextColor(colors.orange)
- m.setCursorPos(13,2)
- m.write("aus")
- --KERN1
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.white)
- m.setCursorPos(1,3)
- m.write("Kern1")
- m.setBackgroundColor(colors.green)
- m.setTextColor(colors.lime)
- m.setCursorPos(10,3)
- m.write("an")
- m.setBackgroundColor(colors.red)
- m.setTextColor(colors.orange)
- m.setCursorPos(13,3)
- m.write("aus")
- --KERN2
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.white)
- m.setCursorPos(1,4)
- m.write("Kern2")
- m.setBackgroundColor(colors.green)
- m.setTextColor(colors.lime)
- m.setCursorPos(10,4)
- m.write("an")
- m.setBackgroundColor(colors.red)
- m.setTextColor(colors.orange)
- m.setCursorPos(13,4)
- m.write("aus")
- print("DRAW-COMPLETE")
- end
- draw()
- local inp = 1
- local count = 0
- while true do
- event,side,x,y = os.pullEvent()
- if event == "monitor_touch" then
- print("SYSTEM-TOUCH")
- -- Licht an
- if x == 10 and y == 1 then
- A = colors.white
- end
- if x == 11 and y == 1 then
- A = colors.white
- end
- -- Licht aus
- if x == 13 and y == 1 then
- A = colors.black
- end
- if x == 14 and y == 1 then
- A = colors.black
- end
- if x == 15 and y == 1 then
- A = colors.black
- end
- -- Monitore an
- if x == 10 and y == 2 then
- B = colors.yellow
- end
- if x == 11 and y == 2 then
- B = colors.yellow
- end
- -- Monitore aus
- if x == 13 and y == 2 then
- B = colors.black
- end
- if x == 14 and y == 2 then
- B = colors.black
- end
- if x == 15 and y == 2 then
- B = colors.black
- end
- -- Kern1 an
- if x == 10 and y == 3 then
- C = colors.green
- end
- if x == 11 and y == 3 then
- C = colors.green
- end
- -- Kern1 aus
- if x == 13 and y == 3 then
- C = colors.black
- end
- if x == 14 and y == 3 then
- C = colors.black
- end
- if x == 15 and y == 3 then
- C = colors.black
- end
- -- Kern2 an
- if x == 10 and y == 4 then
- D = colors.red
- end
- if x == 11 and y == 4 then
- D = colors.red
- end
- -- Kern2 aus
- if x == 13 and y == 4 then
- D = colors.black
- end
- if x == 14 and y == 4 then
- D = colors.black
- end
- if x == 15 and y == 4 then
- D = colors.black
- end
- end
- rs.setBundledOutput("back",A+B+C+D)
- end
Advertisement
Add Comment
Please, Sign In to add comment