Difference between revisions of "Computer (API)"
From ComputerCraft Wiki
m (Stating that computer.getID returns nothing if the observed computer/turtle is not running.) |
(Added peripheral API message) |
||
Line 1: | Line 1: | ||
+ | {{PeripheralAPI}} | ||
+ | {{Stub}} | ||
+ | |||
'''''computer'' stands for the variable you wrapped the computer to.''' | '''''computer'' stands for the variable you wrapped the computer to.''' | ||
''Example:'' computer = peripheral.wrap( "top" ) | ''Example:'' computer = peripheral.wrap( "top" ) |
Revision as of 07:16, 26 March 2014
This API requires the use of a wrapped peripheral! This API does not behave like a regular API, to use it you must first wrap the peripheral and call the methods on the wrapped object. For more information see this page.
|
This page is a stub. Please help us by expanding it.
|
computer stands for the variable you wrapped the computer to. Example: computer = peripheral.wrap( "top" )
Method name | Description |
---|---|
computer.turnOn() | Turns on the Computer or Turtle. |
computer.shutdown() | Shuts off the Computer or Turtle. |
computer.reboot() | Reboots the Computer or Turtle. |
computer.getID() | Gets the ID of the Computer or Turtle if it is running, otherwise returns nothing. |