- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
-
Content Count
4 -
Joined
-
Last visited
Posts posted by Ustoff
-
-
@Fingercomp thx at all!!
-
@Fingercomp, thank you for answer, but I want to operate between gpu's. Dont want to switch screens. Why dot'n developers do such simple functions to screens like term.write.
-
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)
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
Button API now for OC! - Updated 9-6-2014
in Libraries & API's
Posted
This button work great, like DW20 buttons.
But I have a question, how can I operate with two and more gpu's with such code ?
I try to change "local mon = component.gpu " on
function gpuBind(gpuA,scrA)
mon = component.proxy(component.get(gpuAddress))
scr = component.get(screenAddress)
gpu.bind(scr)
return mon
end
local mon = gpuBind("00b","213")
So, How can I call two variables (gpuAddress , screenAddress)in function from other program ?