Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This is part of a Computercraft Programming Teaching Program
- tSides = {"left","right","bottom","top","front","back"}
- for i = 1, #tSides do
- monitor = peripheral.wrap(tSides[i])
- if monitor then
- side = tSides[i]
- break
- end
- end
- --Prevents program termination
- os.pullEvent = os.pullEventRaw
- term.redirect(peripheral.wrap(side))
- -- Resets Screen
- function reset()
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- end
- reset()
- print("Section 8.1 - Redstone cont. \n ")
- print("redstone.getInput(\"back\") - Gets state of redstone input on the selected side as a Boolean (True/False)")
- print(" ")
- print("redstone.getOutput(\"back\") - Gets state of redstone output to the selected side as a Boolean")
- print(" ")
- print("redstone.getBundledOutput(\"side\") - Gets the colored cables that are active")
- print(" ")
- print("redstone.testBundledInput(\"side\", color) - Gets state of bundled cable input on the selected side as a Boolean")
- term.restore()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement