Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- m = peripheral.wrap("right")
- m.clear()
- function fillTable()
- button.setTable("White On", whiteon, 2,10,3,5)
- button.setTable("White Off", whiteoff, 12,20,3,5)
- button.setTable("Orange On", orangeon, 2,10,7,9)
- button.setTable("Orange Off", orangeoff, 12,20,7,9)
- button.setTable("Magenta On", magentaon, 2,10,11,13)
- button.setTable("Magenta Off", magentaoff, 12,20,11,13)
- button.setTable("LBlue On", lblueon, 2,10,15,17)
- button.setTable("LBlue Off", lblueoff, 12,20,15,17)
- button.setTable("Yellow On", yellowon, 22,30,3,5)
- button.setTable("Yellow Off", yellowoff, 32,40,3,5)
- button.setTable("Lime On", limeon, 22,30,7,9)
- button.setTable("Lime Off", limeoff, 32,40,7,9)
- button.setTable("Pink On", pinkon, 22,30,11,13)
- button.setTable("Pink Off", pinkoff, 32,40,11,13)
- button.setTable("Grey On", greyon, 22,30,15,17)
- button.setTable("Grey Off", greyoff, 32,40,15,17)
- button.setTable("LGrey On", lgreyon, 42,50,3,5)
- button.setTable("LGrey Off", lgreyoff, 52,60,3,5)
- button.setTable("Cyan On", cyanon, 42,50,7,9)
- button.setTable("Cyan Off", cyanoff, 52,60,7,9)
- button.setTable("Purple On", purpleon, 42,50,11,13)
- button.setTable("Purple Off", purpleoff, 52,60,11,13)
- button.setTable("Blue On", blueon, 42,50,15,17)
- button.setTable("Blue Off", blueoff, 52,60,15,17)
- button.setTable("Brown On", brownon, 62,70,3,5)
- button.setTable("Brown Off", brownoff, 72,80,3,5)
- button.setTable("Green On", greenon, 62,70,7,9)
- button.setTable("Green Off", greenoff, 72,80,7,9)
- button.setTable("Red On", redon, 62,70,11,13)
- button.setTable("Red Off", redoff, 72,80,11,13)
- button.setTable("Black On", blackon, 62,70,15,17)
- button.setTable("Black Off", blackoff, 72,80,15,17)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)s
- end
- function whiteon()
- button.flash("White On")
- print("White On")
- rednet.open("top")
- rednet.send(107, "whiteon")
- end
- function whiteoff()
- button.flash("White Off")
- print("White Off")
- rednet.open("top")
- rednet.send(107, "whiteoff")
- end
- function orangeon()
- button.flash("Orange On")
- print("Orange On")
- rednet.open("top")
- rednet.send(107, "orangeon")
- end
- function orangeoff()
- button.flash("Orange Off")
- print("Orange Off")
- rednet.open("top")
- rednet.send(107, "orangeon")
- end
- function magentaon()
- button.flash("Magenta On")
- print("Magenta On")
- rednet.open("top")
- rednet.send(107, "magentaon")
- end
- function magentaoff()
- button.flash("Magenta Off")
- print("Magenta Off")
- rednet.open("top")
- rednet.send(107, "magentaoff")
- end
- function lblueon()
- button.flash("LBlue On")
- print("LBlue On")
- rednet.open("top")
- rednet.send(107, "lblueon")
- end
- function lblueoff()
- button.flash("LBlue Off")
- print("LBlue Off")
- rednet.open("top")
- rednet.send(107, "lblueon")
- end
- function yellowon()
- button.flash("Yellow On")
- print("Yellow On")
- rednet.open("top")
- rednet.send(108, "yellowon")
- end
- function yellowoff()
- button.flash("Yellow Off")
- print("Yellow Off")
- rednet.open("top")
- rednet.send(108, "yellowoff")
- end
- function limeon()
- button.flash("Lime On")
- print("Lime On")
- rednet.open("top")
- rednet.send(108, "limeon")
- end
- function limeoff()
- button.flash("Lime Off")
- print("Lime Off")
- rednet.open("top")
- rednet.send(108, "limeon")
- end
- function pinkon()
- button.flash("Pink On")
- print("Pink On")
- rednet.open("top")
- rednet.send(108, "pinkon")
- end
- function pinkoff()
- button.flash("Pink Off")
- print("Pink Off")
- rednet.open("top")
- rednet.send(108, "pinkoff")
- end
- function greyon()
- button.flash("Grey On")
- print("Grey On")
- rednet.open("top")
- rednet.send(108, "greyon")
- end
- function greyoff()
- button.flash("Grey Off")
- print("Grey Off")
- rednet.open("top")
- rednet.send(108, "greyon")
- end
- function lgreyon()
- button.flash("LGrey On")
- print("LGrey On")
- rednet.open("top")
- rednet.send(109, "lgreyon")
- end
- function lgreyoff()
- button.flash("LGrey Off")
- print("LGrey Off")
- rednet.open("top")
- rednet.send(109, "lgreyoff")
- end
- function cyanon()
- button.flash("Cyan On")
- print("Cyan On")
- rednet.open("top")
- rednet.send(109, "cyanon")
- end
- function cyanoff()
- button.flash("Cyan Off")
- print("Cyan Off")
- rednet.open("top")
- rednet.send(109, "cyanon")
- end
- function purpleon()
- button.flash("Purple On")
- print("Purple On")
- rednet.open("top")
- rednet.send(109, "purpleon")
- end
- function purpleoff()
- button.flash("Purple Off")
- print("Purple Off")
- rednet.open("top")
- rednet.send(109, "purpleoff")
- end
- function blueon()
- button.flash("Blue On")
- print("Blue On")
- rednet.open("top")
- rednet.send(109, "blueon")
- end
- function blueoff()
- button.flash("Blue Off")
- print("Blue Off")
- rednet.open("top")
- rednet.send(109, "blueon")
- end
- function brownon()
- button.flash("Brown On")
- print("Brown On")
- rednet.open("top")
- rednet.send(109, "brownon")
- end
- function brownoff()
- button.flash("Brown Off")
- print("Brown Off")
- rednet.open("top")
- rednet.send(109, "brownoff")
- end
- function greenon()
- button.flash("Green On")
- print("Green On")
- rednet.open("top")
- rednet.send(109, "greenon")
- end
- function greenoff()
- button.flash("Green Off")
- print("Green Off")
- rednet.open("top")
- rednet.send(109, "greenon")
- end
- function redon()
- button.flash("Red On")
- print("Red On")
- rednet.open("top")
- rednet.send(109, "redon")
- end
- function redoff()
- button.flash("Red Off")
- print("Red Off")
- rednet.open("top")
- rednet.send(109, "redoff")
- end
- function blackon()
- button.flash("Black On")
- print("Black On")
- rednet.open("top")
- rednet.send(109, "blackon")
- end
- function blackoff()
- button.flash("Black Off")
- print("Black Off")
- rednet.open("top")
- rednet.send(109, "blackon")
- end
- fillTable()
- button.heading("Central Core Control")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement