Laine_prikol

RedBoardControlENG

Feb 12th, 2017
269
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- REDBoardControl ver 1.2 ENG by Laine_prikol
  2. forms=require("forms")
  3. local term = require("term")
  4. local sides = require("sides")
  5. local computer = require("computer")
  6. local component = require("component")
  7. local rs = component.redstone
  8. rs.setOutput(sides.south, 0)
  9.  
  10. Form1=forms.addForm()
  11. Form1.border=2
  12. term.setCursor(2,2)
  13. -- authors
  14. Label1=Form1:addLabel(30,25,"Program author: Laine_prikol Author API: Zer0Galaxy")
  15. Label1=Form1:addLabel(2,1,"REDBOARD Control ver 1.2")
  16. -- Panel 1
  17. Label1=Form1:addLabel(2,2,"Contol front side:")
  18. Btn1=Form1:addButton(2,3,"ON",function() rs.setOutput(sides.south, 15) computer.beep(600,0.5)  end)
  19. Btn1.color=0xfffff                      
  20. Btn2=Form1:addButton(2,4,"OFF",function() rs.setOutput(sides.south, 0) computer.beep(100,0.8) end)
  21. Btn2.color=0xff0000
  22. Btn3=Form1:addButton(2,5,"Cycle",function() while true do rs.setOutput(sides.south, 0) rs.setOutput(sides.south, 15) os.sleep(0.5) end   end)
  23. Btn3.color=0x505050
  24. -- Panel 2
  25. Label1=Form1:addLabel(2,6,"Contol left side:")
  26. Btn4=Form1:addButton(2,7,"ON",function() rs.setOutput(sides.west, 15) computer.beep(600,0.5)  end)
  27. Btn4.color=0xfffff
  28. Btn5=Form1:addButton(2,8,"OFF",function() rs.setOutput(sides.west, 0) computer.beep(100,0.8) end)
  29. Btn5.color=0xff0000
  30. Btn6=Form1:addButton(2,9,"Cycle",function() while true do rs.setOutput(sides.west, 0) rs.setOutput(sides.west, 15) end os.sleep(0.5)  end)
  31. Btn6.color=0x505050
  32. -- Panel 3
  33. Label1=Form1:addLabel(2,10,"Control back side")
  34. Btn7=Form1:addButton(2,11,"ON ",function() rs.setOutput(sides.north, 15) computer.beep(600,0.5)  end)
  35. Btn7.color=0xfffff
  36. Btn8=Form1:addButton(2,12,"OFF",function() rs.setOutput(sides.north, 0) computer.beep(100,0.8) end)
  37. Btn8.color=0xff0000
  38. Btn9=Form1:addButton(2,13,"Cycle",function() while true do rs.setOutput(sides.north, 0) rs.setOutput(sides.north, 15) os.sleep(0.5) end   end)
  39. Btn9.color=0x505050
  40. -- Panel 4
  41. Label1=Form1:addLabel(40,2,"Contol right side")
  42. Btn10=Form1:addButton(40,3,"ON ",function() rs.setOutput(sides.east, 15) computer.beep(600,0.5)  end)
  43. Btn10.color=0xfffff
  44. Btn11=Form1:addButton(40,4,"OFF",function() rs.setOutput(sides.east, 0) computer.beep(100,0.8) end)
  45. Btn11.color=0xff0000
  46. Btn12=Form1:addButton(40,5,"Cycle",function() while true do rs.setOutput(sides.east, 0) rs.setOutput(sides.east, 15) end os.sleep(0.5)  end)
  47. Btn12.color=0x505050
  48. Label1=Form1:addLabel(40,9,"Miscellaneous:")
  49. Btn1=Form1:addButton(40,10,"ALARM",function() while true do computer.beep(775,0.5) end os.sleep(0.5)  end)
  50. Btn1.color=0xfffff
  51. Btn1=Form1:addButton(40,11,"EXIT",function() forms.stop() term.clear() end)
  52. Btn1.color=0x505050
  53. forms.run(Form1) -- Load Form1
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×