rednet.open
rednet.open Function | |
---|---|
Syntax rednet.open(
| |
Returns | nil |
API | rednet |
Source | CC:Tweaked (source) |
Opens rednet on the modem attached to side.
|
|||
Opens rednet on the top modem of the computer. | |||
Code | <nowiki>
rednet.open("top")
</nowiki>
|
||
Output | Rednet events will now trigger on the top modem. |
|
|||
This is a little trick using peripheral.find. It accepts a function as the second argument, which is called for each matching peripheral. By using rednet.open here, every connected modem is opened. | |||
Code | <nowiki>
peripheral.find("modem", rednet.open)
</nowiki>
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.