From ComputerCraft Wiki
Jump to: navigation, search

Grid Redstone.png  Function modem.isPresentRemote
Tells you whether a peripheral is currently connected to the Wired Modem. Note that peripheral.isPresent() can do the same for all peripherals attached to the computer, through modems or otherwise.
Syntax modem.isPresentRemote(string peripheralName)
Returns boolean present
Part of ComputerCraft
API Modem


Grid paper.png  Example
Outputs whether a peripheral is detected under the specified network name.
local modem = peripheral.wrap("top")  -- Or whichever side the modem is connected to.

print( modem.isPresentRemote( "printer_0" ) )
Output "true" if a peripheral called "printer_0" is connected to the modem, otherwise "false".