🎁📬❄️📦 Holiday Shipping Deadlines are approaching! International customers and domestic ground - get your orders in 12/9/2020 📦❄️📬🎁
0

Chained Scrolling Matrix Issue
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Chained Scrolling Matrix Issue

by slogworx on Thu Nov 05, 2020 3:18 pm

Hello,

I have two 64x32 RGB LED Matrix panels that I'm trying to chain together side-by-side for one continuous scroller, but the best I can do so far is just get them both to scroll the same thing.

I am using circuitpython on a raspberry pi 3. I am using the Adafruit RGB Matrix HAT + RTC for Raspberry Pi in this project as well.

The following code produces two separate RGB Matrix that mirror each other rather than work as a single display:

Code: Select all | TOGGLE FULL SIZE
def text_to_matrix(display_text, rgb_code=(0,0,0), display_duration=30):
    FONT_ARCHIVE = '10x20.bdf'
    options = RGBMatrixOptions()
    options.rows = 32
    options.cols = 128
    options.chain_length = 2
    options.hardware_mapping = 'adafruit-hat'
    options.brightness = 25
    matrix = RGBMatrix(options=options)
    canvas = matrix.CreateFrameCanvas()
    font = graphics.Font()
    font.LoadFont(FONT_ARCHIVE)
    font_color = graphics.Color(*rgb_code)
    pos = canvas.width

    # let's scroll text!
    loop_end = time() + display_duration
    while time() < loop_end:
        canvas.Clear()
        len = graphics.DrawText(canvas, font, pos, 20, font_color, display_text)
        pos -= 1
        if (pos + len < 0):
            pos = canvas.width
        sleep(SCROLL_RATE)
        canvas = matrix.SwapOnVSync(canvas)


I'm thinking my hardware is wired up correctly and all working, but I'm doing something wrong with the code or not fully understanding how the displays are supposed to work when chained together. Anything that might point me in the right direction would be helpful!

slogworx
 
Posts: 2
Joined: Fri May 08, 2020 1:21 pm

Re: Chained Scrolling Matrix Issue

by slogworx on Thu Nov 05, 2020 3:45 pm

Nevermind! Not entirely sure what I changed, but I went back through the original code for a single matrix and modified it to work with two, then reset everything, and now it's working!

Happy making all!

slogworx
 
Posts: 2
Joined: Fri May 08, 2020 1:21 pm

Re: Chained Scrolling Matrix Issue

by siddacious on Wed Nov 11, 2020 12:20 am

Glad to hear you figured it out!

siddacious
 
Posts: 372
Joined: Fri Apr 21, 2017 3:09 pm

Please be positive and constructive with your questions and comments.