Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
Crazy_Eddie

The simplest things(Multi-screen usage)

Question

The simpest things throw me. 

 

I have a door.

 

It's made of RIM frames, has a motion detector on each side, and a screen on each side. The computer is mounted on top, and the keyboard is on top of the screen on the inside. It opens when anyone walks within a certain range(4m currently). I'm quite happy with that.

 

What I would like to do is have the outer screen display "computer Lab" until someone opens it, and display "Welcome, [player name]" when that happens. What I can't figure out is how to send a print or write command to the second screen.

 

The inner screen is bound to the primary gpu, outer to the other gpu, and the primary gpu is set primary, all by full address in the autorun in the hard drive, and appears to work flawlessly. 

 

Trying to set the current IO to the address of the second gpu simply results in writing to a new file with the name of that address. 

 

I'm running OpenComputers 1.0.0 in the Yogcast modpack.

 

I am in fact a total noob.

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
  • Solution

you only need 1 gpu

 

bind your gpu to the first screen then use "io.write" to write "Computer Lab"

Then bind it to the second screen.

 

If you want to write a message to the first screen just bind the gpu to the first screen again.

 

If you need to use 2 gpus then do the following.

component = require("component")
component.setPrimary("gpu","your gpu address")

then just use io.write()

Link to post
Share on other sites
  • 0

I did try switching primaries after I posted, but it insisted on writing it to the 1st screen. Just tried switching bindings, and it gave exactly the result I wanted. 

 

To recap: I used only one GPU for both screens, printed "screen one" which appeared on screen one, then used component.gpu.bind(screen two's address), then print("screen two"), which appeared on the other screen.

 

Thanks!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.