redstone.getAnalogOutput

From ComputerCraft Wiki
Jump to: navigation, search


Grid Redstone.png  Function redstone.getAnalogOutput
Returns what was set with redstone.setAnalogOutput().
Syntax redstone.getAnalogOutput(string side)
Returns number strength
Part of ComputerCraft
API redstone

Examples

Grid paper.png  Example
Sets the redstone output strength on the left to 7, then prints the output strength of the left side.
Code
redstone.setAnalogOutput("left", 7) -- Set the output strength on the left to 7
print(redstone.getOutput("left")) -- Print the output strength
Output Prints the strength of the redstone output, so in this case, 7.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox