Advertisement
WorldTeacher

controller

Jul 4th, 2022
863
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. os.loadAPI("BryButtonAPI")
  2.  
  3. monitor = peripheral.find("monitor")
  4. monitor.setTextScale(1)
  5. monitor.setBackgroundColor(colors.black)
  6.   function control(state)
  7.     if state then
  8.         rs.setOutput("right", true)
  9.        
  10.     else
  11.        
  12.         rs.setOutput("right", false)
  13.        
  14.     end
  15. end
  16. red=colors.red
  17. green=colors.green
  18.  
  19.  
  20.  
  21. All=BryButtonAPI.createNewButton(2,2,"All",red, green, true,control )
  22. list={All}
  23. BryButtonAPI.drawButtons(monitor,list)
  24. while true do
  25.     BryButtonAPI.checkButtonsPressed(monitor,list, 0, print)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement