Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This program is designed to operate the storage
- --silo elevator.
- os.loadAPI("button")
- m = peripheral.wrap("back")
- m.clear()
- function fillTable()
- print("Printing Table")
- button.setTable("Up", up, 1, 9, 2, 4)
- button.setTable("Exit", exit, 11, 19, 2, 4)
- button.setTable("Down", down, 21, 29, 2, 4)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function up()
- button.flash("Up")
- redstone.setOutput("right",true)
- sleep(1)
- redstone.setOutput("right",false)
- end
- function down()
- button.flash("Down")
- redstone.setOutput("left", true)
- sleep(1)
- redstone.setOutput("left", false)
- end
- function exit()
- button.flash("Exit")
- end
- fillTable()
- button.heading(" Elevator")
- --button.label(1,5,"test")
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement