Peripheral detach (event)
From ComputerCraft Wiki
| This page needs some serious TLC, stat! Please help us by cleaning it, fixing it up, or sparing it some love.
(Reason: A demonstration on the use and handling of this event would be beneficial. AfterLifeLochie 16:13, 30 November 2012 (MSK)) |
| Fired when a peripheral is disconnected (directly adjacent) from the computer. | |
| Returned Object 1 | The String value of the side of the now-disconnected peripheral. |
Example
p = peripheral.wrap("right") --wraps the peripheral on the right side
event, side =os.pullEvent("peripheral_detach") --wait's until the peripheral is disconnected (e.g. Destroyed)
print(event) --print's the event name
print(side) --print's the side where the Peripheral was