Advertisement
Guest User

startup

a guest
Nov 26th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. os.loadAPI("button")
  2. m = peripheral.wrap("right")
  3. m.clear()
  4.  
  5. function fillTable()
  6.   button.setTable("Test", test, 3,3,7,7)
  7.   button.screen()
  8. end
  9.  
  10. function getClick()
  11.   event,side,x,y = os.pullEvent("monitor_touch")
  12.   button.checkxy(x,y)
  13. end
  14.  
  15. function test()
  16.   button.flash("Test")
  17.   print("Test excecuted")
  18. end
  19.  
  20. fillTable()
  21. button.heading("Test of DW20 Button API")
  22.  
  23. while true do
  24.   getClick()
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement