peripheral.wrap

From ComputerCraft Wiki
Revision as of 20:35, 17 September 2012 by KillaVanilla (Talk | contribs) (Added page for peripheral.wrap())

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function peripheral.wrap
Returns a handle to a peripheral that can then be used to call methods, as if using peripheral.call(side, method)
Syntax peripheral.wrap((string) side)
Returns A handle to the peripheral on side.
Part of ComputerCraft
API peripheral

Examples

Grid paper.png  Example
Prints what has been attached to the computer or turtle's right side.
Code
local handle = peripheral.wrap("right") handle.shutdown()
Output Shuts down any computer to the right of the computer/turtle.