LED-Matrix Panel

Hello,

I am new to the field of LED matrix. So far I have only worked with OLED displays and Arduino Mega/ESP32.

I have several LED matrix 64*64. I can get one to work, but how can I connect several next to each other or one below the other?

No animation/graphics should be played. Only text is there and should be changed from time to time.

If I connect the three displays via HUB75, I see the content three times. However, the text that I enter should go over three 64*64 LED matrix.

I would be happy about a link or sample code (with connections for the PINS).

Thanks and regards
AT

If you want to chain two 64x64 panels together, change the display width in settings from 64 to 128.

i try this, but it’s not work… have you a example of arduino code?

thanks

Please show your code, where you tried to use a three panels

here is it:

when i change #define WIDTH 64 in #define WIDTH 128 not working or more Pixel

###################################################################

#include <DFRobot_RGBMatrix.h> // Hardware-specific library

//variables for all DFRobot RGB Matrix programs
#define OE 9
#define LAT 10
#define CLK 11
#define A A0
#define B A1
#define C A2
#define D A3
#define E A4
#define WIDTH 64
#define HEIGHT 64 // 128 not working

DFRobot_RGBMatrix matrix(A, B, C, D, E, CLK, LAT, OE, false, WIDTH, HEIGHT);

//variables for this specific program
boolean isDown;//determines if the text is moving down
int y;//y position of the text
int c;//counter for changing text color
uint16_t text;//the text color
const uint16_t BACK = matrix.Color333(0, 0, 0);//the background color is black

void setup() {
matrix.begin();
text = matrix.Color333(7, 7, 7); //set text color to white
isDown = true;//text is moving down at start
y = 28;//text starts in the middle

// fill with the background color
matrix.fillScreen(BACK);

// format text and display before starting motion
matrix.setTextSize(1);// size 1 is 8 ‘pixels’ or LEDs tall
matrix.setTextColor(text);
matrix.setCursor(2, y);
matrix.setTextColor(text);
matrix.println(“LED MATRIX”);

delay(2000);
}

void loop() {
//clear previous text
matrix.setCursor(2, y);
matrix.setTextColor(BACK);
matrix.println(“LED MATRIX”);

//move next text
if (isDown){
if(y<56){
y++;
}else{
isDown = false;
}
}else{
if(y>0){
y–;
}else{
isDown = true;
}
}

//change color for next text
if(c<43){
c++;
} else{
c = 0;
}
changeTextColor(c);

//print new text
matrix.setCursor(2, y);
matrix.setTextColor(text);
matrix.println(“LED MATRIX”);

delay(150);
}

// Changes variable text to a color based on input integer from 0 to 43
// If the input is to great color is white, if the input is too low color is black
// As the input increments the colors change red, yellow, green, cyan, blue, magenta, back to almost red
void changeTextColor(int pos) {
if(pos<0){
//negative input, black
text = matrix.Color333(0, 0, 0);
} else if(pos < 7) {
//red to yellow
text = matrix.Color333(7, pos, 0);
} else if(pos < 15) {
//yellow to green
text = matrix.Color333(14-pos, 7, 0);
} else if(pos < 22) {
//green to cyan
text = matrix.Color333(0, 7, pos-14);
} else if(pos < 30){
//cyan to blue
text = matrix.Color333(0, 29-pos, 7);
} else if(pos < 37){
//blue to magenta
text = matrix.Color333(pos-29, 0, 7);
} else if(pos < 44){
//magenta to red
text = matrix.Color333(7, 0, 44-pos);
} else {
//input out of bounds, white
text = matrix.Color333(7, 7, 7);
}
}

This forum about SmartMatrix library, but your code used DFRobot_RGBMatrix.h:

it is completely different library and you better should ask your question to its author.

as far I see, the DFRobot_RGBMatrix.h doesn’t support chaining of panels, so you can’t use it for more than one panel at once.

ohh, ok…but it is possible with SmartMatrix use more then two or more panals? Have you an example?

i want only a text an the displays. Example:

Team
Team A Field A
Team B Field B

yes, sure

look at the examples folder

i know, but it’s example for only one panel…

Take an example, change the dimensions to match what you are using and see what happens…

I tried it and it doesn’t work… the display doubles…

but apparently no one here has tried it with two or more panels…

It works with multiple panels. I often run projects with code based on the examples using multiple panels. I am looking at a 40 panel piece(p10) and a 12 panel piece (p5) from where i sit.

great… and can you tell me how you did it…

So far I’ve read here that it works… but no one can say exactly how…

Simply setting the number of pixels to 128 or higher is not possible…

Can you show me your code?.. it doesn’t have to show everything…

I am assuming you are using a teensy and the appropriate pixelmatix board. If not this is not the place for you to seek help.

Beyond setting up matrix width and height and picking the right teensy / board, the examples require additional configuration.

the thing that is likely hanging you up is this line (row 40 in the matrix clock example, found in all of them)

const uint8_t kPanelType = SM_PANELTYPE_HUB75_32ROW_MOD16SCAN;

This is where you will need to be sure to define the correct type for your panels. I have used p3, p5 p4 and p10 panels and this is different for most of those types. get this wrong and it will render oddly if at all.

for most of the p4 and p5 panels I have used (typically 32 x 64 pix) this works:
const uint8_t kPanelType = SMARTMATRIX_HUB75_32ROW_MOD16SCAN;

for some of the p10 panels I have used (typically 16 x 32 pix), this works:
const uint8_t kPanelType = SMARTMATRIX_HUB75_16ROW_MOD8SCAN;

for a few p3 panels I have, this works:
const uint8_t kPanelType = SMARTMATRIX_HUB75_64ROW_MOD32SCAN;

I have encountered a few panels that I could not drive, for the effort I put in. Not often.

Your actual panel may need some other configuration to render properly.

So, my code will not be helpful unless you have the exact same type of panel I have.

Ther good news is that there is a good bit of info on this site for how to adjust this. I suggest starting here…

also…

Some common kPanelType settings:

  • 32-pixel high panels, e.g. 32x32, 64x32: SM_PANELTYPE_HUB75_32ROW_MOD16SCAN
  • 16-pixel high panels, e.g. 32x16: SMARTMATRIX_HUB75_16ROW_MOD8SCAN
  • 64-pixel high panels, e.g. 64x64, 128x64: SM_PANELTYPE_HUB75_64ROW_MOD32SCAN
  • For other less common panels, see more details in MatrixCommonHub75.h and [the wiki][Home · pixelmatix/SmartMatrix Wiki · GitHub)

The labels “p3 p4 p5” has nothing to do with panel types and using it for characterization of matrix is pointless. The only that “p4” means is a pitch between pixels in mm, “p4” means 4mm between pixels.

To determine the type of panel in the library, you need to use the horizontal and vertical pixels size and the number of scans. All 64x32 s16 panels are controlled the same, regardless of whether they are p3 p4 or p6.

1 Like

you are correct. Still, pixel spacing has a weak link to panel type as the sizes related to each spacing tend to be similar. p3 generally being 64 tall , p4 and 5 being 32 and p10 being 16. For some folks like myself, who are mystified by the nomenclature on the back of these suckers, using p(n) is relatively simple and surprisingly accurate shorthand.

There are many other panel dimensions beside 64, 32 and 16 heights: 40x20, 80x40, 96x48, 112x52, 128x64, 160x80 and so on :slight_smile:
All these matrix can has a various pX pitches…