mrcodetastic / ESP32-HUB75-MatrixPanel-DMA

An Adafruit GFX Compatible Library for the ESP32, ESP32-S2, ESP32-S3 to drive HUB75 LED matrix panels using DMA for high refresh rates. Supports panel chaining.
MIT License
950 stars 211 forks source link

P4 LED Panel 1/32 s #540

Open mjmokhtar opened 10 months ago

mjmokhtar commented 10 months ago

32s that p3 64x32 and have scan 1/32s I have some problems using this panel

  1. panel cut in middle at panel
  2. color must be RED become green

https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA/assets/108962994/53a9be78-c899-4656-82f2-2f72d2063595

here my code `#include "ESP32-HUB75-MatrixPanel-I2S-DMA.h"

//**** Display Config Declaration

define double_buffer

define PANEL_RES_X 64 // Number of pixels wide of each INDIVIDUAL panel module.

define PANEL_RES_Y 32 // Number of pixels tall of each INDIVIDUAL panel module.

define PANEL_CHAIN 2 // Total number of panels chained one to another

MatrixPanel_I2S_DMA* dma_display = nullptr;

define FONT_SIZE 2.85 // Text will be FONT_SIZE x 8 pixels tall.

int delayBetweeenAnimations = 35; // How fast it scrolls, Smaller == faster int scrollXMove = -1; //If positive it would scroll right

int textXPosition = PANEL_RES_X PANEL_CHAIN; // Number of pixels wide of each INDIVIDUAL panel module. // Will start one pixel off screen int textYPosition = PANEL_RES_Y / 2 - (FONT_SIZE 8 / 2); // This will center the text

// For scrolling Text unsigned long isAnimationDue;

String text ="Restek";

uint16_t myBLACK = dma_display->color565(0, 0, 0); uint16_t myWHITE = dma_display->color565(255, 255, 255); uint16_t myRED = dma_display->color565(255, 0, 0); uint16_t myGREEN = dma_display->color565(0, 255, 0); uint16_t myBLUE = dma_display->color565(0, 0, 255);

// Will be used in getTextBounds. int16_t xOne, yOne; uint16_t w, h;

void setup() {

Serial.begin(115200);
// Configurations for Display HUB75_I2S_CFG mxconfig( PANEL_RES_X, // module width PANEL_RES_Y, // module height PANEL_CHAIN // Chain length );

mxconfig.double_buff = true; mxconfig.gpio.e = 32; // mxconfig.clkphase = false; // mxconfig.driver = HUB75_I2S_CFG::FM6124;

// Display Setup dma_display = new MatrixPanel_I2S_DMA(mxconfig); dma_display->begin(); dma_display->setBrightness8(255); //0-255 dma_display->fillScreen(myBLACK); dma_display->setTextSize(FONT_SIZE); dma_display->setTextWrap(false); // N.B!! Don't wrap at end of line dma_display->setTextColor(myRED); // Can change the colour here

}

void loop(){ unsigned long now = millis(); if (now > isAnimationDue) { // This tells the code to update the second buffer dma_display->flipDMABuffer();

// This sets the timer for when we should scroll again.
isAnimationDue = now + delayBetweeenAnimations;

textXPosition += scrollXMove;

// Checking if the very right of the text off screen to the left
dma_display->getTextBounds(text, textXPosition, textYPosition, &xOne, &yOne, &w, &h);
if (textXPosition + w <= 0)
{      
  textXPosition = dma_display->width();
}

dma_display->setCursor(textXPosition, textYPosition);

// The display has to do less updating if you only black out the area
// the text is
//dma_display->fillScreen(myBLACK);
dma_display->fillRect(0, textYPosition, dma_display->width(), FONT_SIZE * 8, myBLACK);
dma_display->print(text);

} }`

as any one have suggest for fix this

mjmokhtar commented 4 months ago

HUB75_I2S_CFG mxconfig( PANEL_RES_X , // DO NOT CHANGE THIS PANEL_RES_Y * 2, // DO NOT CHANGE THIS PANEL_CHAIN // DO NOT CHANGE THIS //,_pins // Uncomment to enable custom pins );

I still save this config

board707 commented 4 months ago

I may have found a bug, try this

#include "ESP32-HUB75-MatrixPanel-I2S-DMA.h"

/* Use a custom Virtual Display class to re-map co-ordinates such that they draw
   correctly on a 32x16 1/4 Scan panel (or chain of such panels).
*/
#include "ESP32-VirtualMatrixPanel-I2S-DMA.h"

/* ================================================== */
// Define custom class derived from VirtualMatrixPanel
class EightPxBasePanel : public VirtualMatrixPanel
{
  public:
    using VirtualMatrixPanel::VirtualMatrixPanel; // inherit VirtualMatrixPanel's constructor(s)

  protected:

    VirtualCoords getCoords(int16_t x, int16_t y);  // custom getCoords() method for specific pixel mapping

};

inline VirtualCoords EightPxBasePanel ::getCoords(int16_t x, int16_t y) {

  coords = VirtualMatrixPanel::getCoords(x, y); // first call base class method to update coords for chaining approach

  if ( coords.x == -1 || coords.y == -1 ) { // Co-ordinates go from 0 to X-1 remember! width() and height() are out of range!
    return coords;
  } 

   if ( coords.x & 64) {
     coords.x -= 64;
     coords.y +=32;
   }
return coords;

}
/* ================================================== */
// Panel configuration
#define PANEL_RES_X 64 // Number of pixels wide of each INDIVIDUAL panel module. 
#define PANEL_RES_Y 32 // Number of pixels tall of each INDIVIDUAL panel module.

#define NUM_ROWS 1 // Number of rows of chained INDIVIDUAL PANELS
#define NUM_COLS 1 // Number of INDIVIDUAL PANELS per ROW
#define PANEL_CHAIN NUM_ROWS*NUM_COLS

// ^^^ NOTE: DEFAULT EXAMPLE SETUP IS FOR A CHAIN OF TWO x 1/8 SCAN PANELS

// Change this to your needs, for details on VirtualPanel pls read the PDF!
#define SERPENT true
#define TOPDOWN false
#define VIRTUAL_MATRIX_CHAIN_TYPE CHAIN_TOP_RIGHT_DOWN

// placeholder for the matrix object
MatrixPanel_I2S_DMA *dma_display = nullptr;

// placeholder for the virtual display object
EightPxBasePanel   *FourScanPanel = nullptr;

/******************************************************************************
   Setup!
 ******************************************************************************/
void setup()
{
  delay(250);

  Serial.begin(115200);
  Serial.println(""); Serial.println(""); Serial.println("");
  Serial.println("*****************************************************");
  Serial.println("*         1/32 Scan Panel Demonstration              *");
  Serial.println("*****************************************************");

  /*
       // 62x32 1/8 Scan Panels don't have a D and E pin!

       HUB75_I2S_CFG::i2s_pins _pins = {
        R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN,
        A_PIN, B_PIN, C_PIN, D_PIN, E_PIN,
        LAT_PIN, OE_PIN, CLK_PIN
       };
  */
  HUB75_I2S_CFG mxconfig(
    PANEL_RES_X  ,            // DO NOT CHANGE THIS
    PANEL_RES_Y * 2,            // DO NOT CHANGE THIS
    PANEL_CHAIN         // DO NOT CHANGE THIS
    //,_pins            // Uncomment to enable custom pins
  );

  mxconfig.clkphase = false; // Change this if you see pixels showing up shifted wrongly by one column the left or right.
  mxconfig.gpio.e = 32;
  //mxconfig.driver   = HUB75_I2S_CFG::FM6126A;     // in case that we use panels based on FM6126A chip, we can set it here before creating MatrixPanel_I2S_DMA object

  // OK, now we can create our matrix object
  dma_display = new MatrixPanel_I2S_DMA(mxconfig);

  // let's adjust default brightness to about 75%
  dma_display->setBrightness8(192);    // range is 0-255, 0 - 0%, 255 - 100%

  // Allocate memory and start DMA display
  if ( not dma_display->begin() )
    Serial.println("****** !KABOOM! I2S memory allocation failed ***********");

  // create FourScanPanellay object based on our newly created dma_display object
  FourScanPanel = new EightPxBasePanel ((*dma_display), NUM_ROWS, NUM_COLS, PANEL_RES_X, PANEL_RES_Y, VIRTUAL_MATRIX_CHAIN_TYPE);

  dma_display->clearScreen();
  delay(500);
  // THE IMPORTANT BIT BELOW!
  // FOUR_SCAN_16PX_HIGH
  // FOUR_SCAN_32PX_HIGH
// **** You don't need to set PhysicalPanelScanRate when use your own virtual panel class
  //FourScanPanel->setPhysicalPanelScanRate(FOUR_SCAN_16PX_HIGH);
}

// Test the pixel mapping - fill the panel pixel by pixel
void loop() {

  for (int i = 0; i < FourScanPanel->height(); i++)
  {
    for (int j = 0; j < FourScanPanel->width(); j++)
    {

      FourScanPanel->drawPixel(j, i, FourScanPanel->color565(255, 255, 255));

      delay(30);
    }
  }

  delay(2000);
  dma_display->clearScreen();

} // end loop
mjmokhtar commented 4 months ago

the result it is same like my video

video5.mp4

board707 commented 4 months ago

At least now it show something...

board707 commented 4 months ago

@mjmokhtar I apologize for so many failed tests - but I think you understand how difficult it is to configure the panel remotely without being able to test it live. So if you want to get the result, we will have to do a few more tests.

mjmokhtar commented 4 months ago

you don't have to apologize about failed tests, I really appreciate you help me doing this remote, is the issue something about parallel i2s ?

board707 commented 4 months ago

is the issue something about parallel i2s ?

What is the issue? The video5 is not wrong, it exactly as it should be.

Are you ready to next test? Please edit the last code changing the getCoords() this way:

inline VirtualCoords EightPxBasePanel ::getCoords(int16_t x, int16_t y) {

  coords = VirtualMatrixPanel::getCoords(x, y); // first call base class method to update coords for chaining approach

  if ( coords.x == -1 || coords.y == -1 ) { // Co-ordinates go from 0 to X-1 remember! width() and height() are out of range!
    return coords;
  } 

   if ( coords.x & 64) {
     coords.x -= 64;
     coords.y +=32;
   }
  coords.x -= (coords.x / (2 * PANEL_RES_X)) * PANEL_RES_X;
return coords;

}

please setup the screen as horizontal row of 3 panels:

#define NUM_ROWS 1 // Number of rows of chained INDIVIDUAL PANELS
#define NUM_COLS 3 // Number of INDIVIDUAL PANELS per ROW
mjmokhtar commented 4 months ago

here is the result the matrixs just prints in left matrix center and right becomes blank

https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA/assets/108962994/8ca6fbc9-d8f7-4611-a9aa-0c3896a659b7

board707 commented 4 months ago

Sorry by asking that - don't you forget to setup a screen as 3x1 panels?

Or try to change the cycle in loop:

for (int i = 0; i < FourScanPanel->height(); i++)
  {
    for (int j = 0; j < 192; j++)
    {

      FourScanPanel->drawPixel(j, i, FourScanPanel->color565(255, 255, 255));

      delay(30);
    }
  }
mjmokhtar commented 4 months ago

i've change screen become 3x1 panels and it become like video6

video6.mp4 also

for (int i = 0; i < FourScanPanel->height(); i++) { for (int j = 0; j < 192; j++) {

  FourScanPanel->drawPixel(j, i, FourScanPanel->color565(255, 255, 255));

  delay(30);
}

}

the result still same as video6

board707 commented 4 months ago

Thank you

Could you test previous code (below) again, but now for 2x1 panel configuration?

#include "ESP32-HUB75-MatrixPanel-I2S-DMA.h"

/* Use a custom Virtual Display class to re-map co-ordinates such that they draw
   correctly on a 32x16 1/4 Scan panel (or chain of such panels).
*/
#include "ESP32-VirtualMatrixPanel-I2S-DMA.h"

/* ================================================== */
// Define custom class derived from VirtualMatrixPanel
class EightPxBasePanel : public VirtualMatrixPanel
{
  public:
    using VirtualMatrixPanel::VirtualMatrixPanel; // inherit VirtualMatrixPanel's constructor(s)

  protected:

    VirtualCoords getCoords(int16_t x, int16_t y);  // custom getCoords() method for specific pixel mapping

};

inline VirtualCoords EightPxBasePanel ::getCoords(int16_t x, int16_t y) {

  coords = VirtualMatrixPanel::getCoords(x, y); // first call base class method to update coords for chaining approach

  if ( coords.x == -1 || coords.y == -1 ) { // Co-ordinates go from 0 to X-1 remember! width() and height() are out of range!
    return coords;
  } 

   if ( coords.x & 64) {
     coords.x -= 64;
     coords.y +=32;
   }
return coords;

}
/* ================================================== */
// Panel configuration
#define PANEL_RES_X 64 // Number of pixels wide of each INDIVIDUAL panel module. 
#define PANEL_RES_Y 32 // Number of pixels tall of each INDIVIDUAL panel module.

#define NUM_ROWS 1 // Number of rows of chained INDIVIDUAL PANELS
#define NUM_COLS 2 // Number of INDIVIDUAL PANELS per ROW
#define PANEL_CHAIN NUM_ROWS*NUM_COLS

// ^^^ NOTE: DEFAULT EXAMPLE SETUP IS FOR A CHAIN OF TWO x 1/8 SCAN PANELS

// Change this to your needs, for details on VirtualPanel pls read the PDF!
#define SERPENT true
#define TOPDOWN false
#define VIRTUAL_MATRIX_CHAIN_TYPE CHAIN_TOP_RIGHT_DOWN

// placeholder for the matrix object
MatrixPanel_I2S_DMA *dma_display = nullptr;

// placeholder for the virtual display object
EightPxBasePanel   *FourScanPanel = nullptr;

/******************************************************************************
   Setup!
 ******************************************************************************/
void setup()
{
  delay(250);

  Serial.begin(115200);
  Serial.println(""); Serial.println(""); Serial.println("");
  Serial.println("*****************************************************");
  Serial.println("*         1/32 Scan Panel Demonstration              *");
  Serial.println("*****************************************************");

  /*
       // 62x32 1/8 Scan Panels don't have a D and E pin!

       HUB75_I2S_CFG::i2s_pins _pins = {
        R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN,
        A_PIN, B_PIN, C_PIN, D_PIN, E_PIN,
        LAT_PIN, OE_PIN, CLK_PIN
       };
  */
  HUB75_I2S_CFG mxconfig(
    PANEL_RES_X  ,            // DO NOT CHANGE THIS
    PANEL_RES_Y * 2,            // DO NOT CHANGE THIS
    PANEL_CHAIN         // DO NOT CHANGE THIS
    //,_pins            // Uncomment to enable custom pins
  );

  mxconfig.clkphase = false; // Change this if you see pixels showing up shifted wrongly by one column the left or right.
  mxconfig.gpio.e = 32;
  //mxconfig.driver   = HUB75_I2S_CFG::FM6126A;     // in case that we use panels based on FM6126A chip, we can set it here before creating MatrixPanel_I2S_DMA object

  // OK, now we can create our matrix object
  dma_display = new MatrixPanel_I2S_DMA(mxconfig);

  // let's adjust default brightness to about 75%
  dma_display->setBrightness8(192);    // range is 0-255, 0 - 0%, 255 - 100%

  // Allocate memory and start DMA display
  if ( not dma_display->begin() )
    Serial.println("****** !KABOOM! I2S memory allocation failed ***********");

  // create FourScanPanellay object based on our newly created dma_display object
  FourScanPanel = new EightPxBasePanel ((*dma_display), NUM_ROWS, NUM_COLS, PANEL_RES_X, PANEL_RES_Y, VIRTUAL_MATRIX_CHAIN_TYPE);

  dma_display->clearScreen();
  delay(500);
  // THE IMPORTANT BIT BELOW!
  // FOUR_SCAN_16PX_HIGH
  // FOUR_SCAN_32PX_HIGH
// **** You don't need to set PhysicalPanelScanRate when use your own virtual panel class
  //FourScanPanel->setPhysicalPanelScanRate(FOUR_SCAN_16PX_HIGH);
}

// Test the pixel mapping - fill the panel pixel by pixel
void loop() {

  for (int i = 0; i < FourScanPanel->height(); i++)
  {
    for (int j = 0; j < FourScanPanel->width(); j++)
    {

      FourScanPanel->drawPixel(j, i, FourScanPanel->color565(255, 255, 255));

      delay(30);
    }
  }

  delay(2000);
  dma_display->clearScreen();

} // end loop
mjmokhtar commented 4 months ago

yes, the result same as video6

Gambar

I don't know why some dots become purple

board707 commented 4 months ago

Sorry, I have no more ideas yet

mjmokhtar commented 4 months ago

maybe you right virtual library doesn't work for this panel

board707 commented 4 months ago

No, I do not think so. A virtual library is no different from a regular one. The problem is that your matrix has a complex line connection scheme that we couldn’t figure out.

mjmokhtar commented 4 months ago

image

i think panel design support for first image (vertical) but we want to change become horizontal

and also the RGB pin is different

When I want green, blue appears instead When I want blue, red appears instead when I want red, led become green

board707 commented 4 months ago

panel design support for first image (vertical) but we want to change become horizontal

I tried to take this into account in the code...

davemaster commented 4 months ago

From the beginning,

Do You have pictures of the back of your panel, connector HUB75 (or whatever it has) and some chips to know about?

The code You share, it's the full code?

Thanks in advance, I hope to help You...

mjmokhtar commented 4 months ago

Gambar WhatsApp 2024-06-09 pukul 13 18 45_e8889172

here is a pic of back my panel

Gambar WhatsApp 2024-06-09 pukul 13 18 49_7f837914

It uses hub75 the chip(ic) shown in the picture, I don't know if ic have another bit trigger or same as other

mjmokhtar commented 4 months ago

for code yes it's full code

The code You share, it's the full code?

hope you can help me Mr @davemaster

davemaster commented 4 months ago

for code yes it's full code

The code You share, it's the full code?

hope you can help me Mr @davemaster

Hi,

Are You using any HAT? How are You connecting the ESP32, what ESP32 board is it? Pictures talk more than 1000 words...

mjmokhtar commented 4 months ago

i just created my prototype hat (shield) Gambar WhatsApp 2024-06-09 pukul 13 48 50_811ab3f6

     #define R1_PIN_DEFAULT  25
    #define G1_PIN_DEFAULT  26
    #define B1_PIN_DEFAULT  27
    #define R2_PIN_DEFAULT  14
    #define G2_PIN_DEFAULT  12
    #define B2_PIN_DEFAULT  13

    #define A_PIN_DEFAULT   23
    #define B_PIN_DEFAULT   22
    #define C_PIN_DEFAULT   5
    #define D_PIN_DEFAULT   19
    #define E_PIN_DEFAULT   32 // IMPORTANT: Change to a valid pin if using a 64x64px panel. 32

    #define LAT_PIN_DEFAULT 21
    #define OE_PIN_DEFAULT  33
    #define CLK_PIN_DEFAULT 18

I've using those pins esp32 for this test

davemaster commented 4 months ago

I use:

imagen

THE DOIT ESP32 DEVKIT V1

I'll try your code at this moment of tranquility... but the day after tomorrow, I will be enable to wire the ESP32 Board for test with a panel; one of mine: 32x32, 32x16, 64x64, 64x32, will see

mjmokhtar commented 4 months ago

this full pic back of panel Gambar WhatsApp 2024-06-09 pukul 13 54 24_d0653394

hope u can help me Mr @davemaster thank you

davemaster commented 4 months ago

Thank you

Could you test previous code (below) again, but now for 2x1 panel configuration?

#include "ESP32-HUB75-MatrixPanel-I2S-DMA.h"

/* Use a custom Virtual Display class to re-map co-ordinates such that they draw
   correctly on a 32x16 1/4 Scan panel (or chain of such panels).
*/
#include "ESP32-VirtualMatrixPanel-I2S-DMA.h"

/* ================================================== */
// Define custom class derived from VirtualMatrixPanel
class EightPxBasePanel : public VirtualMatrixPanel
{
  public:
    using VirtualMatrixPanel::VirtualMatrixPanel; // inherit VirtualMatrixPanel's constructor(s)

  protected:

    VirtualCoords getCoords(int16_t x, int16_t y);  // custom getCoords() method for specific pixel mapping

};

inline VirtualCoords EightPxBasePanel ::getCoords(int16_t x, int16_t y) {

  coords = VirtualMatrixPanel::getCoords(x, y); // first call base class method to update coords for chaining approach

  if ( coords.x == -1 || coords.y == -1 ) { // Co-ordinates go from 0 to X-1 remember! width() and height() are out of range!
    return coords;
  } 

   if ( coords.x & 64) {
     coords.x -= 64;
     coords.y +=32;
   }
return coords;

}
/* ================================================== */
// Panel configuration
#define PANEL_RES_X 64 // Number of pixels wide of each INDIVIDUAL panel module. 
#define PANEL_RES_Y 32 // Number of pixels tall of each INDIVIDUAL panel module.

#define NUM_ROWS 1 // Number of rows of chained INDIVIDUAL PANELS
#define NUM_COLS 2 // Number of INDIVIDUAL PANELS per ROW
#define PANEL_CHAIN NUM_ROWS*NUM_COLS

// ^^^ NOTE: DEFAULT EXAMPLE SETUP IS FOR A CHAIN OF TWO x 1/8 SCAN PANELS

// Change this to your needs, for details on VirtualPanel pls read the PDF!
#define SERPENT true
#define TOPDOWN false
#define VIRTUAL_MATRIX_CHAIN_TYPE CHAIN_TOP_RIGHT_DOWN

// placeholder for the matrix object
MatrixPanel_I2S_DMA *dma_display = nullptr;

// placeholder for the virtual display object
EightPxBasePanel   *FourScanPanel = nullptr;

/******************************************************************************
   Setup!
 ******************************************************************************/
void setup()
{
  delay(250);

  Serial.begin(115200);
  Serial.println(""); Serial.println(""); Serial.println("");
  Serial.println("*****************************************************");
  Serial.println("*         1/32 Scan Panel Demonstration              *");
  Serial.println("*****************************************************");

  /*
       // 62x32 1/8 Scan Panels don't have a D and E pin!

       HUB75_I2S_CFG::i2s_pins _pins = {
        R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN,
        A_PIN, B_PIN, C_PIN, D_PIN, E_PIN,
        LAT_PIN, OE_PIN, CLK_PIN
       };
  */
  HUB75_I2S_CFG mxconfig(
    PANEL_RES_X  ,            // DO NOT CHANGE THIS
    PANEL_RES_Y * 2,            // DO NOT CHANGE THIS
    PANEL_CHAIN         // DO NOT CHANGE THIS
    //,_pins            // Uncomment to enable custom pins
  );

  mxconfig.clkphase = false; // Change this if you see pixels showing up shifted wrongly by one column the left or right.
  mxconfig.gpio.e = 32;
  //mxconfig.driver   = HUB75_I2S_CFG::FM6126A;     // in case that we use panels based on FM6126A chip, we can set it here before creating MatrixPanel_I2S_DMA object

  // OK, now we can create our matrix object
  dma_display = new MatrixPanel_I2S_DMA(mxconfig);

  // let's adjust default brightness to about 75%
  dma_display->setBrightness8(192);    // range is 0-255, 0 - 0%, 255 - 100%

  // Allocate memory and start DMA display
  if ( not dma_display->begin() )
    Serial.println("****** !KABOOM! I2S memory allocation failed ***********");

  // create FourScanPanellay object based on our newly created dma_display object
  FourScanPanel = new EightPxBasePanel ((*dma_display), NUM_ROWS, NUM_COLS, PANEL_RES_X, PANEL_RES_Y, VIRTUAL_MATRIX_CHAIN_TYPE);

  dma_display->clearScreen();
  delay(500);
  // THE IMPORTANT BIT BELOW!
  // FOUR_SCAN_16PX_HIGH
  // FOUR_SCAN_32PX_HIGH
// **** You don't need to set PhysicalPanelScanRate when use your own virtual panel class
  //FourScanPanel->setPhysicalPanelScanRate(FOUR_SCAN_16PX_HIGH);
}

// Test the pixel mapping - fill the panel pixel by pixel
void loop() {

  for (int i = 0; i < FourScanPanel->height(); i++)
  {
    for (int j = 0; j < FourScanPanel->width(); j++)
    {

      FourScanPanel->drawPixel(j, i, FourScanPanel->color565(255, 255, 255));

      delay(30);
    }
  }

  delay(2000);
  dma_display->clearScreen();

} // end loop

Hi again,

What version of esp32 board are You using? imagen I have the one Up

mjmokhtar commented 4 months ago

i'm using esp32 version 2.0.16

davemaster commented 4 months ago

i'm using esp32 version 2.0.16

All this, for have synchronized dev environments

davemaster commented 4 months ago

By the way, had you changed the default wiring come with the github version? Tried with only a panel¿?

mjmokhtar commented 4 months ago

yes, i have changed the default wiring

mjmokhtar commented 4 months ago

fix.zip

here is my code mr @davemaster file .ino was not change u can copy my full from this https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA/issues/540#issuecomment-2156357505

mjmokhtar commented 4 months ago

this full pic back of panel Gambar WhatsApp 2024-06-09 pukul 13 54 24_d0653394

do you have same panels mr @davemaster

davemaster commented 4 months ago

this full pic back of panel Gambar WhatsApp 2024-06-09 pukul 13 54 24_d0653394

do you have same panels mr @davemaster

I CAN'T see the panel picture

mjmokhtar commented 4 months ago

Gambar WhatsApp 2024-06-09 pukul 13 54 24_075e9aa7

@davemaster can you see it

davemaster commented 4 months ago

Well, here are right now the 4:30 AM, let me rest and I will try to wire my esp32 DEVKIT v1 to one of those panels.. Yours is a 32S, A-B-C-D-E lines for rows, I think I have one similar... See You tomorrow late

davemaster commented 4 months ago

Greetings,

Finally, I finished my connection, and take a time to remember some nightmares when a programmer uses another programmer code.

DaveWare Emoji 32x32_and_64x32 HUB75 with SD Card

I'm setting the E-pin as -1, not necessary for the panels I have (64x32 or 32x32). But for the 64x64 I have (x2 units) I put E-pin in 33 pin of my ESP32 Devkit V1

As advice, ALWAYS, ALWAYS use the original examples FIRST; DON'T CHANGE anything... but in my case, I have to change the code for fit my connections... In the begining of the examples files, there are an explanation of HOW TO CUSTOM your connections.


// 0)YOUR redefined pin configuration

#define R1  2
#define G1  23
#define BL1  4
#define R2  16
#define G2  27
#define BL2  17

#define CH_A   5
#define CH_B   18
#define CH_C   19
#define CH_D   21
#define CH_E   -1//GPIO_NUM_33
#define LAT 26
#define OE  25

#define CLK 22

// 1) Include key virtual display library
#include <ESP32-VirtualMatrixPanel-I2S-DMA.h>

// 2) Set configuration
#define PANEL_RES_X 64 // Number of pixels wide of each INDIVIDUAL panel module. 
#define PANEL_RES_Y 32 // Number of pixels tall of each INDIVIDUAL panel module.

#define NUM_ROWS 1 // Number of rows of chained INDIVIDUAL PANELS; FOR TRY, ONLY 1
#define NUM_COLS 1 // Number of INDIVIDUAL PANELS per ROW; FOR TRY, ONLY 1 
#define PANEL_CHAIN NUM_ROWS*NUM_COLS    // total number of panels chained one to 

//LINES BELOW, in setup function... 
 ******************************************************************************/
void setup() {

  delay(2000);
  Serial.begin(115200);
  Serial.println(""); Serial.println(""); Serial.println("");
  Serial.println("*****************************************************");
  Serial.println(" HELLO !");
  Serial.println("*****************************************************");

  /******************************************************************************
   * Create physical DMA panel class AND virtual (chained) display class.   
   ******************************************************************************/
  /*
    The configuration for MatrixPanel_I2S_DMA object is held in HUB75_I2S_CFG structure,
    All options has it's predefined default values. So we can create a new structure and redefine only the options we need
    Please refer to the '2_PatternPlasma.ino' example for detailed example of how to use the MatrixPanel_I2S_DMA configuration
  */

  //Another way of creating config structure
    //Custom pin mapping for all pins
    HUB75_I2S_CFG::i2s_pins _pins={R1, G1, BL1, R2, G2, BL2, CH_A, CH_B, CH_C, CH_D, CH_E, LAT, OE, CLK};
    HUB75_I2S_CFG mxconfig(
                    PANEL_RES_X,    // module width
                    PANEL_RES_Y,    // module height
                    PANEL_CHAIN,    // chain length
                    _pins           // pin mapping      
    );

The result:

![imagen](https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA/assets/1075807/25457130-ecc1-47bb-8f2a-c1d2934d7536)
davemaster commented 4 months ago

imagen

board707 commented 4 months ago

@davemaster Thank you

But I as far I see the result is for standard 64x32 s16 panel. I don't understand what it has to do with @mjmokhtar 64x32 s32 panel?

mjmokhtar commented 4 months ago

yes mr @board707 actually, my panel size is 64x32 but it have 32 scan mr @davemaster i guest using a standard panel which is 16 scan

board707 commented 4 months ago

actually, my panel size is 64x32 but it have 32 scan

It makes the things completely different from 64x32 s16 and 64x64 s32.

davemaster commented 4 months ago

yes mr @board707 actually, my panel size is 64x32 but it have 32 scan mr @davemaster i guest using a standard panel which is 16 scan

Yes, difference, what You need to drive 32S ? check this link

board707 commented 4 months ago

what You need to drive 32S ?

He need to drive 32s on the panel, which has a height also 32. The all panels I had seen before ALWAYS has a scan a half of height or less.

davemaster commented 4 months ago

Then learn, for fast solution, you can get a linsn board, I have RV908 and works great, easy and FAST... check it out

board707 commented 4 months ago

Then learn...

I'm learning. Honesty speaking, I understand quite a lot about this topic.... I can configure almost any panel with a scan of s2, s4, s8 ... just by video, without direct tests. But I couldn’t manage @mjmokhtar's panel because this is the first time I’ve encountered a matrix of this type. I did expect you to help with something more ... interesting. than standard example

davemaster commented 4 months ago

But, here, if you're up to... the solution is HERE ....

ezgif-4-36eb6aafa0

I have no 32S panels... if I have.... better get only 1/16 1/4 1/8

But for your fortune, I'm working in an schematic for a giant panel (with normal parts, no tiny or smd) 512x256 resolution; and I will try that 32S....

good luck

board707 commented 4 months ago

the solution is HERE

There's nothing in the link that might help. There is only general information about the operation of DMD panels, which have long been known to everyone. it seems to me, that you just don't understand the problem; it is not a difficult to manage a 32s panels, the problem is works with matrix where scan is equal to height. So your giant panel is unlikely to help if you use standard 32s modules there.

I'm working in an schematic for a giant panel (with normal parts,

Are you going to make it from individual LEDs (may be ws2812) or from ready-made HUB75 modules?

davemaster commented 4 months ago

the solution is HERE

There's nothing in the link that might help. There is only general information about the operation of DMD panels, which have long been known to everyone. it seems to me, that you just don't understand the problem; it is not a difficult to manage a 32s panels, the problem is works with matrix where scan is equal to height. So your giant panel is unlikely to help if you use standard 32s modules there.

I'm working in an schematic for a giant panel (with normal parts,

Are you going to make it from individual LEDs (may be ws2812) or from ready-made HUB75 modules?

Is possible, there the solution, need to build the software/fpga by yourself...

my panel will be made using RGB 5mm LEDs, no those ws281 2

board707 commented 4 months ago

Is possible, there the solution, need to build the software/fpga by yourself...

Definitely It’s not a problem to write my own code, and there’s no need for a fpga as I think. The problem is that I don’t have these panels, @mjmokhtar has them. So we hoped that you could solve this problem remotely :)

davemaster commented 4 months ago

may be if I have a panel alike.... but..

davemaster commented 4 months ago

yes mr @board707 actually, my panel size is 64x32 but it have 32 scan mr @davemaster i guest using a standard panel which is 16 scan

https://youtu.be/InhCc_-RBb4?si=MDNALST6I_vV8lEq&t=145

mjmokhtar commented 4 months ago

yes mr @board707 actually, my panel size is 64x32 but it have 32 scan mr @davemaster i guest using a standard panel which is 16 scan

https://youtu.be/InhCc_-RBb4?si=MDNALST6I_vV8lEq&t=145

i don't know how to used that lib