Go Down

Topic: P10 32x16 LED panel 1/4 scan now works with Adafruit_GFX (Read 2475 times) previous topic - next topic


I've modified the RGBmatrixPanel.cpp to work with outdoor high brightness P10 32x16 LED panels with 1/4 scanning (4 rows multiplexed) that have a 'snake-pattern' LED row layout (bought here: https://goo.gl/ub1KkE).

It's based on protonmaster's multipanel fork of the Adafruit RGBmatrixPanel.cpp, so it works with multiple panels. The Adafruit_GFX library can now be used with these panels.

To use this library, replace the original RGBmatrixPanel.cpp and RGBmatrixPanel.h with the attached files.

Note that you have to add an extra parameter to the RGBmatrixPanel call, this is to support muliple panels.
For example: RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, false, 2);

Where 2 is the number of panels. The 'false' disables double buffering. Double buffering reduces flickering but uses twice the amount of memory, use 'true' for flicker-free smooth animation if you have plenty of memory.

Tested with Arduino ATMega2560, examples work great!


Hello. Tell me please. I have Arduino uno and I'm trying to connect to it a 16x32 pixel matrix with 1/4 multiplex. I'm using your library. Now I have incorrectly displayed the image on the matrix. I believe that I incorrectly connected the pins.
In the library itself there is a pinout not for all the pins. There are no specified RGB pins.
If you know the pinout for all contacts (there are 16 of them), please tell me how to connect to Arduino, taking into account this library.
I also attach a link. There on the site there is a picture of the pinout (picture under the inscription Interface Definition). I have such a connection cable to the matrix.

In advance thanks for the answer.




great workRuud .
can i use 32x32 p10 rgb with 1/4 scan rate by this modified library?


I have a P10 with 1/2 scan.
This library didnt work.
Is it possible to adapt? ( i Havnt the "c" pin)


Thank you for this modification Ruud

I was trying for along time to fix this problem

everything worked fine for p10 1/4 32*16
but not really with  p10 1/4 32*32 which has only A & B Pins without C and D Pins

How I can deal with this problem?
I think there is something I just need to change in RGBmatrixPanel.cpp or RGBmatrixPanel.h

thank you in advance
waiting for you


Hello everyone and Thank you Ruud Again
I was trying my best to make it work on my 32x32 1/4 scan panel which has only A & B Pins

Thanks to a forum member called Kolnier who shared an Excel file or spreadsheet on google Documents that lets you draw something on it cell by cell then copy the wanted code which automatically generated and paste to Arduino program to test it on the panel. I downloaded that file and tried to modify to make it work with my 32x32 panel.

It worked after making so many changes to The spreadsheet and Arduino code.

The result was the total right half of the panel worked great, but the other left side is totally blank and not showing anything.

here is the link to the modified sheet 32x32 1/4 scan rate panel spreadsheet Thanks again to Kolnirer who allowed to share and modify.
You will also find some helpful drawings on the other sheets that might guide you to a better solution.

and here is the current code I'm using for the Arduino:

Code: [Select]

uint64_t row1[128];
uint64_t temp;

int LP = 8;            // Latch Pin
int ClkP = 12;         // Clock Pin
int R1P = 11;          // R1 Pin
int B1P = 10;          // B1 Pin
int G1P = 9;           // G1 Pin
int R2P = 7;           // R2 Pin
int B2P = 6;           // B2 Pin
int G2P = 5;           // G2 Pin
int AP = 2;            // A Pin
int BP = 3;            // B Pin
int CP = 4;            // C Pin
int OEP = 13;          // OE Pin
int row = 0;
uint8_t i;

void setup() {
//set pins to output so you can control the shift register
pinMode(LP, OUTPUT);
pinMode(ClkP, OUTPUT);
pinMode(R1P, OUTPUT);
pinMode(B1P, OUTPUT);
pinMode(G1P, OUTPUT);
pinMode(R2P, OUTPUT);
pinMode(B2P, OUTPUT);
pinMode(G2P, OUTPUT);

digitalWrite(AP, LOW);
digitalWrite(BP, LOW);
digitalWrite(CP, LOW);
digitalWrite(LP, LOW);
digitalWrite(OEP, LOW);
temp =  0x00000000000000000000000000000001; 

//------------------------Paste here:

//----------------------------up to here

void loop() {
for(row=0; row<4; row++){
   for (i = 0; i < 128; i++)  {
      digitalWrite(B1P, 0);
      digitalWrite(R1P, 0);
      digitalWrite(G1P, !!(row1[row] & (temp << (127-i))));
      digitalWrite(B2P, 0);
      digitalWrite(R2P, 0);
      digitalWrite(G2P, !!(row1[row+4] & (temp << (127-i))));
      digitalWrite(ClkP, HIGH);
      digitalWrite(ClkP, LOW);
   digitalWrite(OEP, HIGH);
   digitalWrite(LP, HIGH); 
   digitalWrite(AP, !!(row & B00000001));
   digitalWrite(BP, !!(row & B00000010));
   digitalWrite(CP, !!(row & B00000100));
   digitalWrite(OEP, LOW);
   digitalWrite(LP, LOW); 

This should show number 1 on the right side of your panel if it has only A & B Pins and I want it to be working on the whole panel.

please share your experience with everyone.

I hope Someone could solve it and help me finish my project.

Thank you.


There are two primary types of drivers for stepper motor wholesale, constant voltage drives (also referred to as L/R drives), and constant current drives (also referred to as chopper drives)---


Hello, I have a question

The library solution you gave was very useful. I have tried all the features of Adafruit and just could not find any information about brightness. There seems to be 2 options for brightness.

The first one is software, but I'm browsing. No one related to RGB panel gave information about brightness.

The second is the current setting and the brightness setting, but it is not very stable, but I wanted to ask you.

If I can not get a result for the first option I will have to try the second one but I want to choose the software version Is there someone that can help?


Can you nobody help me?
Try to connect (EN for Hub08 Panels) or (OE for Hub75 Panels) to 5v port on the Arduino board.
Be careful not to connect it with GND.



arduino mega2560

I tried sketching P10 RGB 1/4, but with the following error

C:\Users\jangSu\AppData\Local\Temp\ccHiVcko.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_testcolors_16x32.ino.cpp.o.2336':

ccHiVcko.ltrans0.o:(.text.startup+0x7c): undefined reference to `RGBmatrixPanel::RGBmatrixPanel(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, bool, unsigned char)'

collect2.exe: error: ld returned 1 exit status

Go Up