Difference between revisions of "Redstone.setOutput"

From ComputerCraft Wiki
Jump to: navigation, search
(back ^^)
m (Moved to CAT:LuaCoreFunctions)
Line 16: Line 16:
 
* List of possible sides: left, right, front, back, bottom, top
 
* List of possible sides: left, right, front, back, bottom, top
 
}}
 
}}
 +
 +
[[Category:Lua_Core_Functions]]

Revision as of 18:53, 28 November 2012


Grid Redstone.png  Function redstone.setOutput
No description provided.
Syntax redstone.setOutput(string side, boolean state)
Returns nil
Part of ComputerCraft
API redstone

Examples

Grid paper.png  Example
Makes the computer output a redstone signal
Code
redstone.setOutput("back", true)
sleep(1)
redstone.setOutput("back", false)
Output Redstone wire connected to the back of the computer will be powered for one second, then unpowered (unless it's powered by another source)

Additional Notes

  • This function will throw an error if you give it an invalid side.
  • List of possible sides: left, right, front, back, bottom, top