32x64 RGB LED Matrix P4 (LM-P4-SMD-RGB-LED) Basic Test [D025]





https://www.youtube.com/watch?v=_ouIlwGYBXk


*GitHub https://github.com/rdiot/rdiot-d025.git


* Specs

P4 smd 3in1 led display module:

Pixel Pitch   P4

Pixel Component  3in1

Pixel Density  62500dot/m⊃2;

Pixel configuration 1R1G1B

Module resolution(dots) 64x32 

Module dimension(mm) 256x128

Drive Mode 1/16

Brightness   2500cd/m2;

Viewing Angle  Horizontal:160°   Vertical:160°

Control Distance    100m

Refresh Frequency Rate 400Hz/S

Life Span   100,000hours

Display MTBF   10,000 Hours

Constant Working Time  72hours

Operation Temperature   -40°C~+70°C

Operation Humidity  10%-90%RH

Blind Pixels Rate  0.0001

Smooth   ±1mm


* Contents

- Refer Url : https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/connecting-with-jumper-wires

- Refer Url : https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/library

- Refer Url : https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/how-the-matrix-works


- Library 1 : https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/

- Library 2 : https://github.com/adafruit/Adafruit-GFX-Library 


- Connect

GND ----- 3EA GND

R1 ----- D24

G1 ----- D25

B1 ----- D26

R2 ----- D27

B2 ----- D28

G2 ----- D29

A   ----- A0

B   ----- A1

C   ----- A2

D   ----- A3

LAT ----- D10

CLK ----- D11

OE   ----- D9


- Key Code

#include <Adafruit_GFX.h>   // Core graphics library

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


#define OE   9

#define LAT 10

#define CLK 11

#define A   A0

#define B   A1

#define C   A2

#define D   A3


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


void setup() {


  matrix.begin();

  

  // draw a pixel in solid white

  matrix.drawPixel(0, 0, matrix.Color333(7, 7, 7)); 

  delay(500);


  // fix the screen with green

  matrix.fillRect(0, 0, matrix.width(), matrix.height(), matrix.Color333(0, 7, 0));

  delay(500);


  // draw a box in yellow

  matrix.drawRect(0, 0, matrix.width(), matrix.height(), matrix.Color333(7, 7, 0));

  delay(500);

  

  // draw an 'X' in red

  matrix.drawLine(0, 0, matrix.width()-1, matrix.height()-1, matrix.Color333(7, 0, 0));

  matrix.drawLine(matrix.width()-1, 0, 0, matrix.height()-1, matrix.Color333(7, 0, 0));

  delay(500);

  

  // draw a blue circle

  matrix.drawCircle(10, 10, 10, matrix.Color333(0, 0, 7));

  delay(500);

  

  // fill a violet circle

  matrix.fillCircle(40, 21, 10, matrix.Color333(7, 0, 7));

  delay(500);

  

  // fill the screen with 'black'

  matrix.fillScreen(matrix.Color333(0, 0, 0));

  

  // draw some text!

  matrix.setTextSize(1);     // size 1 == 8 pixels high

  matrix.setTextWrap(false); // Don't wrap at end of line - will do ourselves


  matrix.setCursor(8, 0);    // start at top left, with 8 pixel of spacing

  uint8_t w = 0;

  char *str = "RD Kim  IoT Making";

  for (w=0; w<8; w++) {

    matrix.setTextColor(Wheel(w));

    matrix.print(str[w]);

  }

  matrix.setCursor(2, 8);    // next line

  for (w=8; w<18; w++) {

    matrix.setTextColor(Wheel(w));

    matrix.print(str[w]);

  }

  matrix.println();

  //matrix.setTextColor(matrix.Color333(4,4,4));

  //matrix.println("Industries");

  matrix.setTextColor(matrix.Color333(7,7,7));

  matrix.println("LED MATRIX!");

  

  // print each letter with a rainbow color

  matrix.setTextColor(matrix.Color333(7,0,0));

  matrix.print('3');

  matrix.setTextColor(matrix.Color333(7,4,0)); 

  matrix.print('2');

  matrix.setTextColor(matrix.Color333(7,7,0));

  matrix.print('x');

  matrix.setTextColor(matrix.Color333(4,7,0)); 

  matrix.print('6');

  matrix.setTextColor(matrix.Color333(0,7,0));  

  matrix.print('4');

  matrix.setCursor(34, 24);  

  matrix.setTextColor(matrix.Color333(0,7,7)); 

  matrix.print("*");

  matrix.setTextColor(matrix.Color333(0,4,7)); 

  matrix.print('R');

  matrix.setTextColor(matrix.Color333(0,0,7));

  matrix.print('G');

  matrix.setTextColor(matrix.Color333(4,0,7)); 

  matrix.print("B");

  matrix.setTextColor(matrix.Color333(7,0,4)); 

  matrix.println("*");

}

Posted by RDIoT
|