peripheral event
peripheral Event | |
---|---|
Returns
| |
Source | CC:Tweaked |
Occurs every time a peripheral is attached.
|
|||
Waits for a peripheral to be attached and alerts the user what type of peripheral was attached. | |||
Code | <nowiki>
local event, peripheral_name = os.pullEvent("peripheral")
local peripheral_type = peripheral.getType(peripheral_name)
print("A", peripheral_type, "has been attached.")
</nowiki>
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.