Difference between revisions of "Modem.open"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) m (Expanded) |
MKlegoman357 (Talk | contribs) m (Added 'local modem = peripheral.wrap("top")') |
||
Line 9: | Line 9: | ||
{{Example | {{Example | ||
|desc=Opens channel 1 to allow listening for messages. | |desc=Opens channel 1 to allow listening for messages. | ||
− | |code= modem.open(1) | + | |code= local modem = [[peripheral.wrap]]("top") |
+ | |||
+ | modem.open(1) | ||
print("Channel 1 is now opened for listening.") | print("Channel 1 is now opened for listening.") | ||
|output=Channel 1 is now opened for listening. | |output=Channel 1 is now opened for listening. |
Latest revision as of 15:45, 9 April 2014
Function modem.open | |
Opens the specified channel to allow listening for messages. | |
Syntax | modem.open(number channel) |
Returns | nil |
Part of | ComputerCraft |
API | Modem |
Examples
Example | |
Opens channel 1 to allow listening for messages. | |
Code |
local modem = peripheral.wrap("top") modem.open(1) print("Channel 1 is now opened for listening.") |
Output | Channel 1 is now opened for listening. |