peripheral.wrap

From ComputerCraft
Jump to navigation Jump to search

peripheral.wrap
Function
Syntax
peripheral.wrap(
  • side or network name : string
)

Returns boolean result
API peripheral
Source Lua (source)

Allows you to use a peripheral’s functions at the specified side or network name.

Error creating thumbnail: Unable to save thumbnail to destination
ExampleOpen the modem right of the computer/turtle.
Open the modem right of the computer/turtle.
Code
local modem = peripheral.wrap("modem_1234")
rednet.open(modem)
Output true