Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Test Monitor

DerMarten Jul 28th, 2015 182 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. os.loadAPI("button")
  2. m = peripheral.wrap("monitor_0")
  3. m.clear()
  4. --------------------------------
  5. function fillTable()
  6.   button.setTable("Licht oben", button1, 2, 12, 2, 4)
  7.   button.setTable("Licht unten", button2, 16, 26, 2, 4)
  8.   button.setTable("Tor", button3, 2, 12, 6, 8)
  9.   button.setTable("Tur", button4, 16, 26, 6, 8)
  10.   button.setTable("Strom", button5, 2, 12, 10, 12)
  11.   button.setTable("ME", button6, 16, 26, 10, 12)
  12.   button.setTable("Button7", button7, 2, 12, 14, 16)
  13.   button.setTable("Button8", button8, 16, 26, 14, 16)
  14.   button.setTable("ALARM", button9, 2, 26, 18, 19)
  15. --------------------------------xmin-xmax-ymin-ymax
  16.   button.screen()
  17. end
  18.  
  19. function getClickt()
  20.   event, side,x,y = os.pullEvent("monitor_touch")
  21.   button.checkxy(x,y)
  22. end
  23. function button1()
  24.   button.toggleButton("Licht oben")
  25. end
  26. function getClickt()
  27.   event, side,x,y = os.pullEvent("monitor_touch")
  28.   button.checkxy(x,y)
  29. end
  30. function button2()
  31.   button.toggleButton("Licht unten")
  32. end
  33. function getClickt()
  34.   event, side,x,y = os.pullEvent("monitor_touch")
  35.   button.checkxy(x,y)
  36. end
  37. function button3()
  38.   button.toggleButton("Tor")
  39. end
  40. function getClickt()
  41.   event, side,x,y = os.pullEvent("monitor_touch")
  42.   button.checkxy(x,y)
  43. end
  44. function button4()
  45.   button.toggleButton("Tur")
  46. end
  47. function getClickt()
  48.   event, side,x,y = os.pullEvent("monitor_touch")
  49.   button.checkxy(x,y)
  50. end
  51. function button5()
  52.   button.toggleButton("Strom")
  53. end
  54. function getClickt()
  55.   event, side,x,y = os.pullEvent("monitor_touch")
  56.   button.checkxy(x,y)
  57. end
  58. function button6()
  59.   button.toggleButton("ME")
  60. end
  61. function getClickt()
  62.   event, side,x,y = os.pullEvent("monitor_touch")
  63.   button.checkxy(x,y)
  64. end
  65. function button7()
  66.   button.toggleButton("Button7")
  67. end
  68. function getClickt()
  69.   event, side,x,y = os.pullEvent("monitor_touch")
  70.   button.checkxy(x,y)
  71. end
  72. function button8()
  73.   button.toggleButton("Button8")
  74. end
  75. function getClickt()
  76.   event, side,x,y = os.pullEvent("monitor_touch")
  77.   button.checkxy(x,y)
  78. end
  79. function button9()
  80.   button.toggleButton("ALARM")
  81. end
  82. -------------------------------------
  83. fillTable()
  84. while true do
  85.   getClickt()
  86. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top