Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Redstone Controller
- local modem = peripheral.wrap("back")
- modem.open(997)
- while true do
- redstone.setBundledOutput("right", 0)
- term.clear()
- term.setCursorPos(1,1)
- print("Redstone Controller\n")
- local looping = true
- while looping do
- local output = redstone.getBundledOutput("right", 0)
- print("Current Output: "..output)
- local event = {os.pullEvent()}
- if event[1] == "redstone" then
- print("Change in redstone input")
- local input = redstone.getBundledInput("top")
- print("Input: "..input)
- if input ~= 0 then
- output = input
- else
- print("Input = 0. No reset needed")
- end
- redstone.setBundledOutput("right", output)
- print("New Output: "..output)
- elseif event[1] == "modem_message" then
- print("Refreshing")
- looping = false
- end
- end
- end
Add Comment
Please, Sign In to add comment