I have to write a little test program to understand How can I write text on the second screen, and I can't understand, what I do wrong.
That's the code
local component = require ("component")
local term = require("term")
local gpu2a = component.get("7ba")
local gpu2 = component.proxy(gpu2a)
local scr2a = component.get("e6e")
local scr2 = component.proxy(scr2a)
gpu2.bind(scr2a)
term.write("Hello")
--gpu2.setBackground(0xe9ebe4)
gpu2.setResolution(36,5)
gpu2.setForeground(0xd98116)
gpu2.fill(1,1,36,5, "X")
os.sleep(0.9)
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.
I have to write a little test program to understand How can I write text on the second screen, and I can't understand, what I do wrong.
That's the code
local component = require ("component") local term = require("term") local gpu2a = component.get("7ba") local gpu2 = component.proxy(gpu2a) local scr2a = component.get("e6e") local scr2 = component.proxy(scr2a) gpu2.bind(scr2a) term.write("Hello") --gpu2.setBackground(0xe9ebe4) gpu2.setResolution(36,5) gpu2.setForeground(0xd98116) gpu2.fill(1,1,36,5, "X") os.sleep(0.9)
http://pastebin.com/RxVTmdp4
gpu2a - address of the second gpu card
scr2a - address of the second screen
So, when text printed , it printed on the first screen, again and again
If I use print("Hello") instead term.write, so text will be written on the first screen.
On the picture - right screen - scr2
What command I need to write in my code , that computer can write text on the second screen with binding on the second gpu
Link to post
Share on other sites