hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.64k stars 1.16k forks source link

2 pixels light on, instead of 1 #1378

Open olmichal opened 2 years ago

olmichal commented 2 years ago

Hello everyone!

I have a problem with the pixel display. When I use the SetPixel() function, the corresponding pixel is displayed and one on the right. For example: I set the SetPixel function SetPixel(1,1,255,255,255) and the matrix displays pixel [1] [1] and [2] [1] in white. Or in the rectangle example, there are 11 columns instead of 10.

Here is my code: test1.txt

#!/usr/bin/env python3

import time
import sys

from rgbmatrix import RGBMatrix, RGBMatrixOptions

options = RGBMatrixOptions()
options.rows = 16
options.cols = 32
options.chain_length = 1
options.parallel = 1
options.hardware_mapping = 'regular'

matrix = RGBMatrix(options=options)

for i in range(1,11):
    for j in range(1,11):
        matrix.SetPixel(i,j,0,0,255)

try:
    print("Press CTRL+C to stop.")
    while True:
        time.sleep(100)
except KeyboardInterrupt:
    sys.exit(0)

I cloned the repo: git clone https://github.com/hzeller/rpi-rgb-led-matrix

I have also installed some dependencies: sudo apt-get update && sudo apt-get install -y git python3-dev python3-pillow

I used those commands in the repo folder: make build-python PYTHON=$(which python3) sudo make install-python PYTHON=$(which python3)

I have made my code executable: chmod +x test1.py sudo ./test1.py

Here is how I have done the wiring: Connection Pin Pin Connection
- 1 2 -
- 3 4 -
- 5 6 GND
STB 7 8 -
- 9 10 -
CLK 11 12 OE
G1 13 14 -
A 15 16 B
- 17 18 C
B2 19 20 -
G2 21 22 NC
R1 23 24 R2
- 25 26 B1

I also set isolcpus=3 in cmdline.txt and dtparam=audio=off in config.txt. I am using Raspberry Pi 3B and 5V/2A Power Supply for the Matrix.

Is there anything I can do to fix this?

EDIT: It happens only on the left side of the panel

1

2

MichalLinde commented 2 years ago

I have the exactly same problem