32x16 LED matrix programing with Adafruit library

I have a led matrix from huidu. I use Adafruit library to programing it. But works so strange. It loads 2 pixel at each time. What is the problem?

#include <RGBmatrixPanel.h>
#define CLK  8   // USE THIS ON ADAFRUIT METRO M0, etc.
//#define CLK A4 // USE THIS ON METRO M4 (not M0)
#define OE   9
#define LAT 10
#define A   A0
#define B   A1
#define C   A2

RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, false);

void setup() {
  for(int i = 0; i<32;i++)
  for(int j = 0; j<16;j++)
  matrix.drawPixel(i, j, matrix.Color333(5, 0, 0));


void loop() {
  // put your main code here, to run repeatedly:


I tried your sketch - same result. the library is broken.

Did you tried with adafruit LED matrix or Chinese huidu or other Chinese product?

1 Like

Where did the missing { go?

Not necessary in this case.

Thank you. Do you use another library for your led matrix?

Did you connect D pin to ground? And this panel also have 16x32 LED?

I'm sure this worked before. I tested the matrix after purchase and until now tetris was uploaded.

my panel is 32*32. D is declared RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);
but neither yours nor mine sketch work now.

1 Like

My bad, you're right.

This library solved my problem.

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