Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = peripheral.wrap("back")
- mon = peripheral.wrap("top")
- local bool1 = false
- local bool2 = false
- local bool3 = false
- local bool4 = false
- local bool5 = false
- local bool6 = false
- mon.clear()
- while true do
- mon.setTextScale(1)
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.yellow)
- mon.write("System Motoren")
- mon.setTextScale(1)
- mon.setCursorPos(1,2)
- mon.setTextColor(colors.white)
- mon.write("Anlage 1")
- mon.setCursorPos(1,3)
- mon.write("Pumpe1 :")
- mon.setCursorPos(1,4)
- mon.write("Pumpe2 :")
- mon.setCursorPos(16,2)
- mon.write("Anlage2")
- mon.setCursorPos(16,3)
- mon.write("Pumpe1 :")
- mon.setCursorPos(16,4)
- mon.write("Pumpe2 :")
- mon.setCursorPos(1,6)
- mon.write("Speicher")
- mon.setCursorPos(1,7)
- mon.write("Pumpe1 :")
- mon.setCursorPos(1,8)
- mon.write("Pumpe2 :")
- mon.setCursorPos(16,6)
- mon.write("Tank")
- mon.setCursorPos(16,7)
- mon.write("Tank1 :")
- mon.setCursorPos(16,8)
- mon.write("Tank2 ;")
- if bool1 == true then
- mon.setCursorPos(10,3)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool1 == false then
- mon.setCursorPos(10,3)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool2 == true then
- mon.setCursorPos(10,4)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool2 == false then
- mon.setCursorPos(10,4)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool3 == true then
- mon.setCursorPos(26,3)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool3 == false then
- mon.setCursorPos(26,3)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool4 == true then
- mon.setCursorPos(26,4)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool4 == false then
- mon.setCursorPos(26,4)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool5 == true then
- mon.setCursorPos(10,7)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool5 == false then
- mon.setCursorPos(10,7)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool6 == true then
- mon.setCursorPos(10,8)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool6 == false then
- mon.setCursorPos(10,8)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- event,top,x,y = os.pullEvent()
- if event == "monitor_touch" then
- if x == 10 and y == 3 then
- if bool1 == false then
- bool1 = true
- else
- bool1 = false
- end
- end
- end
- event,top,x,y = os.pullEvent()
- if event == "monitor_touch" then
- if x == 10 and y == 4 then
- if bool2 == false then
- bool2 = true
- else
- bool2 = false
- end
- end
- end
- event,top,x,y = os.pullEvent()
- if event == "monitor_touch" then
- if x == 26 and y == 3 then
- if bool3 == false then
- bool3 = true
- else
- bool3 = false
- end
- end
- end
- event,top,x,y = os.pullEvent()
- if event == "monitor_touch" then
- if x == 26 and y == 4 then
- if bool4 == false then
- bool4 = true
- else
- bool4 = false
- end
- end
- end
- event,top,x,y = os.pullEvent()
- if event == "monitor_touch" then
- if x == 10 and y == 7 then
- if bool5 == false then
- bool5 = true
- else
- bool5 = false
- end
- end
- end
- event,top,x,y = os.pullEvent()
- if event == "monitor_touch" then
- if x == 10 and y == 8 then
- if bool6 == false then
- bool6 = true
- else
- bool6 = false
- end
- end
- end
- if bool1 == true then
- p.setBundledOutput(colors.white)
- end
- if bool2 == true then
- p.setBundledOutput(colors.orange)
- end
- if bool1 == true and bool2 == true then
- p.setBundledOutput(colors.white + colors.orange + colors.brown + colors.purple)
- end
- if bool1 == false or bool2 == false then
- p.setBundledOutput(colors.blue)
- end
- if bool3 == true then
- p.setBundledOutput(colors.yellow)
- end
- if bool4 == true then
- p.setBundledOutput(colors.lime)
- end
- if bool3 == true and bool4 == true then
- p.setBundledOutput(colors.yellow + colors.lime + colors.brown + colors.purple)
- end
- if bool3 == false or bool4 == false then
- p.setBundledOutput(colors.red)
- end
- if bool5 == true then
- p.setBundledOutput(colors.purple)
- end
- if bool6 == true then
- p.setBundledOutput(colors.brown)
- end
- if bool5 == true and bool6 == true then
- p.setBundledOutput(colors.brown + colors.purple)
- end
- if bool5 == false or bool6 == false then
- p.setBundledOutput(colors.red)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement