Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.unloadAPI("button")
- os.loadAPI("button")
- button.setMon("top")
- function setbuttons()
- button.add("status", "On/Off","toggle",2,2,12,4,colors.red,colors.green,colors.white,function() prepMsg() end)
- button.setState("status",false)
- button.draw()
- end
- m=peripheral.wrap("top")
- m.setTextScale(1)
- m.setTextColor(5)
- function writeAt(x,y,text)
- m.setCursorPos(x,y)
- m.write(text)
- end
- function prepMsg()
- msg="toggleActive|sdf"
- rednet.open("bottom")
- shell.run("clear")
- rednet.send(80,msg) -- Reactor Control Screen
- end
- --Main Program
- m.clear()
- setbuttons()
- while true do
- button.check() -- This goes into a wait loop and does not come out again....
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement