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

Ustoff

Members
  • Content Count

    4
  • Joined

  • Last visited

Posts posted by Ustoff

  1. 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 ?

  2. 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

    2016-11-27_02.35.29.png

×
×
  • Create New...

Important Information

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