Use jetson Nano with LED matrix 32 * 64 adafruit

Hello everyone,

I am trying to use an adafruit LED matrix 32 * 64 with jetson nano, i can draw the pixels i want but i can’t keep them persistent. What i mean by persistence is when i draw the next line, the line before shuts down. I am using GPIO pins to connect my matrix with jetson nano and Jetson.GPIO as framework to use GPIO pins.

Thank you in advance for your answers.

hello user104992,

may I know what’s the hardware connections, did you connect all line selections to Jetson platform?

Hi JerryChanh,

I follow this tutorial to connect my led matrix to jetson Wiring the Display | Connecting a 16x32 RGB LED Matrix Panel to a Raspberry Pi | Adafruit Learning System. Of course i adapted to the jetson.

hello user104992,

please check NVIDIA Jetson Nano J41 Header Pinout – JetsonHacks,
had you done any pin configurations, you may refer to Configuring Jetson Expansion Header by using Jetson-IO to configure pins.


I already made all the configurations. I activated all the pins available on the jetson nano. I can use them as outputs. But i do not understand why the LED on the matrix does not stay persistent

hello user104992,

were you able to enable all LED bulbs?
please narrow down the issue, you may check whether the GPIO state has changed during your implementation,

Hello JerryChang,

This is the code i am using to draw rectangles on LED matrix.

import Jetson.GPIO as GPIO
import time

def bits_from_int(x):
    a_bit = x & 1
    b_bit = x & 2
    c_bit = x & 4
    return (a_bit, b_bit, c_bit)

def fill_rectangle(screen, x1, y1, x2, y2, color):
    for x in range(x1, x2):
        for y in range(y1, y2):
            screen[y][x] = color

def main():
    RED = 1
    GREEN = 2
    BLUE = 7
    ROWS = 32
    COLS = 64


    red1_pin = 11
    green1_pin = 12
    blue1_pin = 15
    red2_pin = 16
    green2_pin = 18
    blue2_pin = 22
    clock_pin = 29
    a_pin = 26
    b_pin = 24
    c_pin = 21
    d_pin = 23
    latch_pin = 7
    oe_pin = 13

    GPIO.setup(red1_pin, GPIO.OUT)
    GPIO.setup(green1_pin, GPIO.OUT)
    GPIO.setup(blue1_pin, GPIO.OUT)
    GPIO.setup(red2_pin, GPIO.OUT)
    GPIO.setup(green2_pin, GPIO.OUT)
    GPIO.setup(blue2_pin, GPIO.OUT)
    GPIO.setup(clock_pin, GPIO.OUT)
    GPIO.setup(a_pin, GPIO.OUT)
    GPIO.setup(b_pin, GPIO.OUT)
    GPIO.setup(c_pin, GPIO.OUT)
    GPIO.setup(d_pin, GPIO.OUT)
    GPIO.setup(latch_pin, GPIO.OUT)
    GPIO.setup(oe_pin, GPIO.OUT)

    screen = [[0 for x in range(COLS)] for x in range(ROWS)]
    fill_rectangle(screen, 0, 0, 12, 12, RED)
    fill_rectangle(screen, 20, 4, 30, 15, GREEN)
    fill_rectangle(screen, 15, 0, 19, 7, BLUE)
    while (True):
        for row in range(int(ROWS / 2)):
            GPIO.output(a_pin, row & 1)
            GPIO.output(b_pin, row & 2)
            GPIO.output(c_pin, row & 4)
            GPIO.output(d_pin, row & 8)
            sel_row = row + 1
            if sel_row > (ROWS / 2) - 1:
                sel_row = 0
            for col in range(COLS):
                #set up colors top
                red, green, blue = bits_from_int(screen[sel_row][col])
                GPIO.output(red1_pin, red)
                GPIO.output(green1_pin, green)
                GPIO.output(blue1_pin, blue)

                #set up colors bot
                red, green, blue = bits_from_int(screen[sel_row + 16][col])

                GPIO.output(red2_pin, red)
                GPIO.output(green2_pin, green)
                GPIO.output(blue2_pin, blue)

                ## RIGHT CODE
                GPIO.output(oe_pin, GPIO.LOW)
                GPIO.output(clock_pin, GPIO.HIGH)
                GPIO.output(oe_pin, GPIO.HIGH)
                GPIO.output(clock_pin, GPIO.LOW)
            GPIO.output(latch_pin, GPIO.HIGH)
            GPIO.output(latch_pin, GPIO.LOW)
if __name__ == "__main__":

And this is the result i get so far:

As you can see only one row is light up. And when i try light up next one previous row shut down.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

hello user104992,

do you have camera device connected? this pin-29, CAM_AF_EN which by default used by camera drivers.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.