Difference between revisions of "OpenComputers Interface"

From WebDisplays
Jump to: navigation, search
(Created page with "The OpenComputers Interface is a peripheral which can be used by OpenComputer computers to interact with screens. ==Recipe== File:Ocinterface.png =...")
 
Line 1: Line 1:
The OpenComputers Interface is a [[Screen#Peripheral|peripheral]] which can be used by OpenComputer computers to interact with screens.
+
The OpenComputers Interface is a [[Screen#Peripheral|peripheral]] which can be used by OpenComputers computers to interact with screens.
  
 
==Recipe==
 
==Recipe==
Line 5: Line 5:
  
 
==How to use==
 
==How to use==
First, place the block next to an OpenComputer computer and link it to a screen using the [[Linking Tool]]. Then, you'll need its OpenComputers address, which can be obtained this way:
+
First, place the block next to an OpenComputers computer and link it to a screen using the [[Linking Tool]]. Then, you'll need its OpenComputers address, which can be obtained this way:
 
<syntaxhighlight lang="lua" line='line'>
 
<syntaxhighlight lang="lua" line='line'>
 
component = component or require("components")
 
component = component or require("components")

Revision as of 09:28, 13 February 2018

The OpenComputers Interface is a peripheral which can be used by OpenComputers computers to interact with screens.

Recipe

Ocinterface.png

How to use

First, place the block next to an OpenComputers computer and link it to a screen using the Linking Tool. Then, you'll need its OpenComputers address, which can be obtained this way:

 1 component = component or require("components")
 2 wdScreenAddress = nil
 3 
 4 for addr, name in component.list() do
 5     if name == "webdisplays" then
 6         wdScreenAddress = addr
 7         break
 8     end
 9 end
10 
11 if not wdScreenAddress then
12     print("Couldn't find WebDisplays screen")
13     return
14 end

Then, you'll need a proxy to execute WebDisplays functions:

1 wdScreen = component.proxy(wdScreenAddress)

This process is detailed on the OpenComputers wiki.

Permissions

This interface will have the same restrictions and permissions and the player who placed the block.

Functions

TODO