redstone.setOutput

When given a parameter with a valid side, this function will return a boolean value indicating whether the computer or turtle is receiving a redstone signal. Where true corresponds to a present signal and false corresponds to no present signal.

ExampleCheck for receiving sides
redstone.setOutput sets the redstone output as a boolean, defining whether to send output on the specified side or not.
Code
<nowiki>
redstone.setOutput("top", true)
sleep(5)
redstone.setOutput("top", false)
    </nowiki>
Output Redstone will be on on the top for 5 seconds, and then will be turned off.

redstone.setOutput
Function
Syntax
redstone.setOutput(
  • side : string
  • output : boolean
)

Returns nil
API redstone
Source CC:Tweaked (source)
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.