Peripheral (event)
From ComputerCraft Wiki
Event peripheral | |
Fired when a peripheral is connected (directly adjacent) to the computer. | |
Returned Object 1 | The string value of the side of the connected peripheral. |
Example | |
Prints if it found the peripheral it was looking for ( in this example modem, more peripheral type here peripheral.getType | |
Code |
while true do event, side = os.pullEvent("peripheral") if peripheral.getType(side) == "modem" then print("A modem has been attached!") break end end |