board707 / DMD_STM32

STM32Duino library for RGB, Monochrome and Two-color led matrix panels
GNU General Public License v3.0
65 stars 21 forks source link

P5 32x64 scan problem #35

Closed miralay001 closed 1 year ago

miralay001 commented 1 year ago

I have a p5 32x64 1/8 color scanning screen, I used your patterns, but I was not successful, can you help me?

`#define NAME_OF_PANEL MUX pins, Panel_width, Panel_height, scan, pattern ID

define RGB64x32_S8_OKSingra 3,64,32,8,1

// Pins for R0, G0, B0, R1, G1, B1 channels and for clock. // By default the library uses RGB color order. // If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins. // All this pins also must be selected from same port! uint8_t custom_rgbpins[] = { PA15, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1

// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH> // We use 64x32 matrix with 16 scans and 4bit color: DMD_RGB <RGB64x32_S8_OKSingra , COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER); // other options are: // - 32x16 matrix with 8scans // - 80x40 matrix with 20scans // - 64x64 matrix with 32scans // Color depth - , or

// --- Define fonts ---- // DMD.h old style font DMD_Standard_Font UkrRusArial_F(UkrRusArial_14); // GFX font with sepatate parts for Latin and Cyrillic chars DMD_GFX_Font GlametrixL((uint8_t)&GlametrixLight12pt7b, (uint8_t)&GlametrixLight12pt8b_rus, 0x80, 13);

/*-------------------------------------------------------------------------------------- UTF8 char recoding

--------------------------------------------------------------------------------------/ int utf8_rus(char dest, const unsigned char* src) {

uint16_t i, j;
for (i = 0, j = 0; src[i]; i++) {
    if ((src[i] == 0xD0) && src[i + 1]) { dest[j++] = src[++i] - 0x10; }
    else if ((src[i] == 0xD1) && src[i + 1]) { dest[j++] = src[++i] + 0x30; }
    else dest[j++] = src[i];
}
dest[j] = '\0';
return j;

}

/-------------------------------------------------------------------------------------- setup Called by the Arduino architecture before the main loop begins --------------------------------------------------------------------------------------/

void setup(void) {

// initialize DMD objects
dmd.init(); 

}

/*--------------------


loop Arduino architecture main loop --------------------------------------------------------------------------------------*/

void loop(void) { uint16_t bg = 0; // background - black uint16_t fg = dmd.Color888(0, 255, 0);; // foreground // draw pixels for (int i = 0; i < dmd.height(); i++) { for (int j = 0; j < dmd.width(); j++) { dmd.drawPixel(j,i, fg); delay(30); } } // clear the screen dmd.fillScreen(bg);

}`

the most i could do

https://user-images.githubusercontent.com/108148338/229152384-c77dcd28-360a-43e4-a639-6ce3649922f4.mp4

board707 commented 1 year ago

Hi Could you show clear photo of the panel from the reverse side?

miralay001 commented 1 year ago

WhatsApp Görsel 2023-04-01 saat 01 14 53 WhatsApp Görsel 2023-04-01 saat 01 15 06

HRL - P5 -8S 1921 64X32-V2.0 OUTDOOR PANEL

board707 commented 1 year ago

Thank you Could you also indicate, a marks of all the chips on the matrix? What's the board are you using - stm32 or rp2040?

Try to replace the class initialization line with this:

DMD_RGB_SHIFTREG_ABC <RGB64x32_S8_OKSingra , COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);

And if the behaviour will changed, show the video.

miralay001 commented 1 year ago
#define NAME_OF_PANEL MUX pins, Panel_width, Panel_height, scan, pattern ID
#define RGB64x32_S8_OKSingra 3,64,32,8,0

DMD_RGB_SHIFTREG_ABC <RGB64x32_S8_OKSingra , COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);

https://user-images.githubusercontent.com/108148338/229279622-fa297dc4-4518-459b-b233-c031270a5b28.mp4

i tried the code

the card i use : stm32f103c8t6

I've used your library before with the p10 matrix without any problems.

i have p5 right now

chip on panel SM162085

pnl

DMD_RGB<RGB64x32_S8_OKSingra , COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);

https://user-images.githubusercontent.com/108148338/229280164-6a496ac9-c49f-4aec-a9a2-40e04b4f337e.mp4 RESULT WHEN I REMOVE SHIFTREG_ABC

board707 commented 1 year ago

hmm... I don't understand this matrix

try to use #define RGB64x32_S8_OKSingra 3,64,32,8,1 or #define RGB64x32_S8_OKSingra 3,64,32,8,2

board707 commented 1 year ago

=== edited comment=== I reread the datasheet and came to the conclusion that your matrix should work with the library. So please try the defines mentioned above. What is the exact marks on the IC, labelled as MM245? Are there any other chips other the MM245 and SM1620x ones? Please show your test code in full. What the pins are you use for A B C channels?

miralay001 commented 1 year ago

thank you for helping

there is no different chip on the panel MM245B and SM18208SJ

Here are the pins I use and all the code

#include "DMD_RGB.h"

 // Fonts includes
#include "st_fonts/UkrRusArial14.h"
#pragma GCC diagnostic ignored "-Wnarrowing"
#pragma GCC diagnostic ignored "-Woverflow"
#include "gfx_fonts/GlametrixLight12pt7b.h"
#include "gfx_fonts/GlametrixBold12pt7b.h"
#pragma GCC diagnostic warning "-Wnarrowing"
#pragma GCC diagnostic warning "-Woverflow" 

//Number of panels in x and y axis
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1

// Enable of output buffering
// if true, changes only outputs to matrix after
// swapBuffers(true) command
// If dual buffer not enabled, all output draw at matrix directly
// and swapBuffers(true) cimmand do nothing
#define ENABLE_DUAL_BUFFER false

// ==== DMD_RGB pins ====
// mux pins - A, B, C... all mux pins must be selected from same port!
#define DMD_PIN_A PB6
#define DMD_PIN_B PB5
#define DMD_PIN_C PB4
#define DMD_PIN_D PB3
#define DMD_PIN_E PB8
// put all mux pins at list
uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C , DMD_PIN_D , DMD_PIN_E };

// pin OE must be one of PB0 PB1 PA6 PA7
#define DMD_PIN_nOE PB0
#define DMD_PIN_SCLK PB7
//#define NAME_OF_PANEL  MUX pins, Panel_width, Panel_height, scan, pattern ID
//#define RGB32x16_S2_OKSingra  1,32,16,2,55
#define NAME_OF_PANEL MUX pins, Panel_width, Panel_height, scan, pattern ID
#define RGB64x32_S8_OKSingra     3,64,32,8,0

// Pins for R0, G0, B0, R1, G1, B1 channels and for clock.
// By default the library uses RGB color order.
// If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins.
// All this pins also must be selected from same port!
uint8_t custom_rgbpins[] = { PA15, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1

// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH>
// We use 64x32 matrix with 16 scans and 4bit color:
DMD_RGB<RGB64x32_S8_OKSingra , COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
// other options are:
// <RGB32x16plainS8> -  32x16 matrix with 8scans
// <RGB80x40plainS20> - 80x40 matrix with 20scans
// <RGB64x64plainS32> - 64x64 matrix with 32scans
// Color depth - <COLOR_4BITS_Packed>, <COLOR_4BITS> or <COLOR_1BITS>

// --- Define fonts ----
// DMD.h old style font
DMD_Standard_Font UkrRusArial_F(UkrRusArial_14);
// GFX font with sepatate parts for Latin and Cyrillic chars
DMD_GFX_Font GlametrixL((uint8_t*)&GlametrixLight12pt7b, (uint8_t*)&GlametrixLight12pt8b_rus, 0x80, 13);

/*--------------------------------------------------------------------------------------
  UTF8 char recoding

--------------------------------------------------------------------------------------*/
int utf8_rus(char* dest, const unsigned char* src) {

    uint16_t i, j;
    for (i = 0, j = 0; src[i]; i++) {
        if ((src[i] == 0xD0) && src[i + 1]) { dest[j++] = src[++i] - 0x10; }
        else if ((src[i] == 0xD1) && src[i + 1]) { dest[j++] = src[++i] + 0x30; }
        else dest[j++] = src[i];
    }
    dest[j] = '\0';
    return j;
}

/*--------------------------------------------------------------------------------------
  setup
  Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------*/

void setup(void)
{

    // initialize DMD objects
    dmd.init(); 

}

/*--------------------------------------------------------------------------------------
  loop
  Arduino architecture main loop
--------------------------------------------------------------------------------------*/

void loop(void) {
uint16_t bg = 0;                         // background - black
uint16_t fg = dmd.Color888(0, 255, 0);;  // foreground 
    // draw pixels
    for (int i = 0; i < dmd.height(); i++) {
        for (int j = 0; j < dmd.width(); j++) {
            dmd.drawPixel(j,i, fg);
            delay(30);
        }
    }
    // clear the screen
    dmd.fillScreen(bg);

}
miralay001 commented 1 year ago

hmm... I don't understand this matrix

try to use #define RGB64x32_S8_OKSingra 3,64,32,8,1 or #define RGB64x32_S8_OKSingra 3,64,32,8,2

I tried both patterns

RGB64x32_S8_OKSingra 3,64,32,8,1 = pattern in first video RGB64x32_S8_OKSingra 3,64,32,8,2 = i am getting error

board707 commented 1 year ago

RGB64x32_S8_OKSingra 3,64,32,8,1 = pattern in first video

It looks like one of pins A, B or C is not works. Please check your connections. Or try to swap A and C, for example

RGB64x32_S8_OKSingra 3,64,32,8,2 = i am getting error

Please show the error message

miralay001 commented 1 year ago

After changing PIN numbers

/*--------------------------------------------------------------------------------------
 Demo for RGB panels

 DMD_STM32a example code for STM32F103xxx board
 ------------------------------------------------------------------------------------- */
#include "DMD_RGB.h"

 // Fonts includes
#include "st_fonts/UkrRusArial14.h"
#pragma GCC diagnostic ignored "-Wnarrowing"
#pragma GCC diagnostic ignored "-Woverflow"
#include "gfx_fonts/GlametrixLight12pt7b.h"
#include "gfx_fonts/GlametrixBold12pt7b.h"
#pragma GCC diagnostic warning "-Wnarrowing"
#pragma GCC diagnostic warning "-Woverflow" 

//Number of panels in x and y axis
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1

// Enable of output buffering
// if true, changes only outputs to matrix after
// swapBuffers(true) command
// If dual buffer not enabled, all output draw at matrix directly
// and swapBuffers(true) cimmand do nothing
#define ENABLE_DUAL_BUFFER false

// ==== DMD_RGB pins ====
// mux pins - A, B, C... all mux pins must be selected from same port!
#define DMD_PIN_A PB6
#define DMD_PIN_B PB5
#define DMD_PIN_C PB4
#define DMD_PIN_D -
#define DMD_PIN_E -
// put all mux pins at list
uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C};

// pin OE must be one of PB0 PB1 PA6 PA7
#define DMD_PIN_nOE PB0
#define DMD_PIN_SCLK PB7
//#define NAME_OF_PANEL  MUX pins, Panel_width, Panel_height, scan, pattern ID
//#define RGB32x16_S2_OKSingra  1,32,16,2,55
#define NAME_OF_PANEL MUX pins, Panel_width, Panel_height, scan, pattern ID
#define RGB64x32_S8_OKSingra     3,64,32,8,1

// Pins for R0, G0, B0, R1, G1, B1 channels and for clock.
// By default the library uses RGB color order.
// If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins.
// All this pins also must be selected from same port!
uint8_t custom_rgbpins[] = { PA15, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1

// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH>
// We use 64x32 matrix with 16 scans and 4bit color:
DMD_RGB<RGB64x32_S8_OKSingra , COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
// other options are:
// <RGB32x16plainS8> -  32x16 matrix with 8scans
// <RGB80x40plainS20> - 80x40 matrix with 20scans
// <RGB64x64plainS32> - 64x64 matrix with 32scans
// Color depth - <COLOR_4BITS_Packed>, <COLOR_4BITS> or <COLOR_1BITS>

// --- Define fonts ----
// DMD.h old style font
DMD_Standard_Font UkrRusArial_F(UkrRusArial_14);
// GFX font with sepatate parts for Latin and Cyrillic chars
DMD_GFX_Font GlametrixL((uint8_t*)&GlametrixLight12pt7b, (uint8_t*)&GlametrixLight12pt8b_rus, 0x80, 13);

/*--------------------------------------------------------------------------------------
  UTF8 char recoding

--------------------------------------------------------------------------------------*/
int utf8_rus(char* dest, const unsigned char* src) {

    uint16_t i, j;
    for (i = 0, j = 0; src[i]; i++) {
        if ((src[i] == 0xD0) && src[i + 1]) { dest[j++] = src[++i] - 0x10; }
        else if ((src[i] == 0xD1) && src[i + 1]) { dest[j++] = src[++i] + 0x30; }
        else dest[j++] = src[i];
    }
    dest[j] = '\0';
    return j;
}

/*--------------------------------------------------------------------------------------
  setup
  Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------*/

void setup(void)
{

    // initialize DMD objects
    dmd.init(); 

}

/*--------------------------------------------------------------------------------------
  loop
  Arduino architecture main loop
--------------------------------------------------------------------------------------*/

void loop(void) {
uint16_t bg = 0;                         // background - black
uint16_t fg = dmd.Color888(0, 255, 0);;  // foreground 
    // draw pixels
    for (int i = 0; i < dmd.height(); i++) {
        for (int j = 0; j < dmd.width(); j++) {
            dmd.drawPixel(j,i, fg);
            delay(30);
        }
    }
    // clear the screen
    dmd.fillScreen(bg);

}

https://user-images.githubusercontent.com/108148338/229301364-80d5c6c6-009d-4627-8b95-79ab4d688806.mp4

board707 commented 1 year ago

Success! Now A B C pins are works.

Could you please test

#define RGB64x32_S8_OKSingra     3,64,32,8,0

and

#define RGB64x32_S8_OKSingra     3,64,32,8,2

again with new A B C pins?

miralay001 commented 1 year ago

#define RGB64x32_S8_OKSingra 3,64,32,8,0 test with pattern

https://user-images.githubusercontent.com/108148338/229315865-31bab274-229b-4e62-b827-d87073679d80.mp4

#define RGB64x32_S8_OKSingra 3,64,32,8,2 test with pattern

https://user-images.githubusercontent.com/108148338/229315887-57b25011-c41a-4719-8669-9dac65c707cd.mp4

miralay001 commented 1 year ago

dmd_rgb.ino Test #define RGB64x32_S8_OKSingra 3,64,32,8,2

https://user-images.githubusercontent.com/108148338/229316148-6bf79adb-a342-4da4-aa84-a9eea610f699.mp4

dmd_rgb.ino Test #define RGB64x32_S8_OKSingra 3,64,32,8,1

https://user-images.githubusercontent.com/108148338/229316269-996065be-cc21-4e3f-b6be-1f33771ca57e.mp4

dmd_rgb.ino Test #define RGB64x32_S8_OKSingra 3,64,32,8,0

https://user-images.githubusercontent.com/108148338/229316322-d1ef7d7a-66bc-4496-95fb-8753d06f00ec.mp4

board707 commented 1 year ago

Thank you very much.

I will try to understand the pattern and write to you.

board707 commented 1 year ago

Hi Let's test your pattern. Please add this piece to your code just after #include "RGB.h" line:

#define RGB64x32_s8_miralay     3,64,32,8,56    // 64x32 s8

template<int COL_DEPTH>
class DMD_RGB<RGB64x32_s8_miralay, COL_DEPTH> : public DMD_RGB_BASE2<COL_DEPTH>
{
public:
    DMD_RGB(uint8_t* mux_list, byte _pin_nOE, byte _pin_SCLK, uint8_t* pinlist,
        byte panelsWide, byte panelsHigh, bool d_buf = false) :
        DMD_RGB_BASE2<COL_DEPTH>(1, mux_list, _pin_nOE, _pin_SCLK, pinlist,
            panelsWide, panelsHigh, d_buf, COL_DEPTH, 2, 32, 16)
    {
        this->fast_Hbyte = false;
        this->use_shift = false;
    }
    // Fast text shift is disabled for complex patterns, so we don't need the method
    void disableFastTextShift(bool shift) override {}

protected:
    uint16_t get_base_addr(int16_t x, int16_t y) override {
        this->transform_XY(x, y);
        uint8_t pol_y = y % this->pol_displ;
        x += (y / this->DMD_PIXELS_DOWN) * this->WIDTH;

                static const uint8_t Pan_quart_cnt = this->DMD_PIXELS_ACROSS / 4;
                uint16_t base_addr = this->x_len * (pol_y % this->n_Rows) + (x / this->DMD_PIXELS_ACROSS) * this->DMD_PIXELS_ACROSS * this->multiplex ;
                 if (pol_y < this->n_Rows)   base_addr += 4;
         base_addr += ((x / 4) % Pan_quart_cnt) * 8 + x % 4;

        return base_addr;
    }

};

and for DMD initializtation use the matrix type RGB64x32_s8_miralay too

miralay001 commented 1 year ago

`/*-------------------------------------------------------------------------------------- Demo for RGB panels

DMD_STM32a example code for STM32F103xxx board ------------------------------------------------------------------------------------- */

include "DMD_RGB.h"

define RGB64x32_s8_miralay 3,64,32,8,56 // 64x32 s8

template class DMD_RGB<RGB64x32_s8_miralay, COL_DEPTH> : public DMD_RGB_BASE2 { public: DMD_RGB(uint8_t mux_list, byte _pin_nOE, byte _pin_SCLK, uint8_t pinlist, byte panelsWide, byte panelsHigh, bool d_buf = false) : DMD_RGB_BASE2(1, mux_list, _pin_nOE, _pin_SCLK, pinlist, panelsWide, panelsHigh, d_buf, COL_DEPTH, 2, 32, 16) { this->fast_Hbyte = false; this->use_shift = false; } // Fast text shift is disabled for complex patterns, so we don't need the method void disableFastTextShift(bool shift) override {}

protected: uint16_t get_base_addr(int16_t x, int16_t y) override { this->transform_XY(x, y); uint8_t pol_y = y % this->pol_displ; x += (y / this->DMD_PIXELS_DOWN) * this->WIDTH;

            static const uint8_t Pan_quart_cnt = this->DMD_PIXELS_ACROSS / 4;
            uint16_t base_addr = this->x_len * (pol_y % this->n_Rows) + (x / this->DMD_PIXELS_ACROSS) * this->DMD_PIXELS_ACROSS * this->multiplex ;
             if (pol_y < this->n_Rows)   base_addr += 4;
 base_addr += ((x / 4) % Pan_quart_cnt) * 8 + x % 4;

return base_addr;

}

};

// Fonts includes

include "st_fonts/UkrRusArial14.h"

pragma GCC diagnostic ignored "-Wnarrowing"

pragma GCC diagnostic ignored "-Woverflow"

include "gfx_fonts/GlametrixLight12pt7b.h"

include "gfx_fonts/GlametrixBold12pt7b.h"

pragma GCC diagnostic warning "-Wnarrowing"

pragma GCC diagnostic warning "-Woverflow"

//Number of panels in x and y axis

define DISPLAYS_ACROSS 1

define DISPLAYS_DOWN 1

// Enable of output buffering // if true, changes only outputs to matrix after // swapBuffers(true) command // If dual buffer not enabled, all output draw at matrix directly // and swapBuffers(true) cimmand do nothing

define ENABLE_DUAL_BUFFER false

// ==== DMD_RGB pins ==== // mux pins - A, B, C... all mux pins must be selected from same port!

define DMD_PIN_A PB6

define DMD_PIN_B PB5

define DMD_PIN_C PB4

define DMD_PIN_D -

define DMD_PIN_E -

// put all mux pins at list uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C};

// pin OE must be one of PB0 PB1 PA6 PA7

define DMD_PIN_nOE PB0

define DMD_PIN_SCLK PB7

//#define NAME_OF_PANEL MUX pins, Panel_width, Panel_height, scan, pattern ID //#define RGB32x16_S2_OKSingra 1,32,16,2,55

define NAME_OF_PANEL MUX pins, Panel_width, Panel_height, scan, pattern ID

// Pins for R0, G0, B0, R1, G1, B1 channels and for clock. // By default the library uses RGB color order. // If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins. // All this pins also must be selected from same port! uint8_t custom_rgbpins[] = { PA15,PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1

// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH> // We use 64x32 matrix with 16 scans and 4bit color: DMD_RGB<RGB64x32_s8_miralay , COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER); // other options are: // - 32x16 matrix with 8scans // - 80x40 matrix with 20scans // - 64x64 matrix with 32scans // Color depth - , or

// --- Define fonts ---- // DMD.h old style font DMD_Standard_Font UkrRusArial_F(UkrRusArial_14); // GFX font with sepatate parts for Latin and Cyrillic chars DMD_GFX_Font GlametrixL((uint8_t)&GlametrixLight12pt7b, (uint8_t)&GlametrixLight12pt8b_rus, 0x80, 13);

/*-------------------------------------------------------------------------------------- UTF8 char recoding

--------------------------------------------------------------------------------------/ int utf8_rus(char dest, const unsigned char* src) {

uint16_t i, j;
for (i = 0, j = 0; src[i]; i++) {
    if ((src[i] == 0xD0) && src[i + 1]) { dest[j++] = src[++i] - 0x10; }
    else if ((src[i] == 0xD1) && src[i + 1]) { dest[j++] = src[++i] + 0x30; }
    else dest[j++] = src[i];
}
dest[j] = '\0';
return j;

}

/-------------------------------------------------------------------------------------- setup Called by the Arduino architecture before the main loop begins --------------------------------------------------------------------------------------/

void setup(void) {

// initialize DMD objects
dmd.init(); 

}

/-------------------------------------------------------------------------------------- loop Arduino architecture main loop --------------------------------------------------------------------------------------/

void loop(void) { uint16_t bg = 0; // background - black uint16_t fg = dmd.Color888(0, 255, 0);; // foreground // draw pixels for (int i = 0; i < dmd.height(); i++) { for (int j = 0; j < dmd.width(); j++) { dmd.drawPixel(j,i, fg); delay(30); } } // clear the screen dmd.fillScreen(bg);

}` image

I get this error

board707 commented 1 year ago

Sorry, please replace n_Rows with nRows

miralay001 commented 1 year ago

latest status

https://user-images.githubusercontent.com/108148338/229567802-2fcb5a41-75e4-46f9-b314-b5d7cea39c6a.mp4

board707 commented 1 year ago

I'm sorry, as I don't have a matrix, I not able to test the code before provide it to you

Please test the next variant:

#define RGB64x32_s8_miralay     3,64,32,8,56    // 64x32 s8

template<int COL_DEPTH>
class DMD_RGB<RGB64x32_s8_miralay, COL_DEPTH> : public DMD_RGB_BASE2<COL_DEPTH>
{
public:
    DMD_RGB(uint8_t* mux_list, byte _pin_nOE, byte _pin_SCLK, uint8_t* pinlist,
        byte panelsWide, byte panelsHigh, bool d_buf = false) :
        DMD_RGB_BASE2<COL_DEPTH>(3, mux_list, _pin_nOE, _pin_SCLK, pinlist,
            panelsWide, panelsHigh, d_buf, COL_DEPTH, 8, 64, 32)
    {
        this->fast_Hbyte = false;
        this->use_shift = false;
    }
    // Fast text shift is disabled for complex patterns, so we don't need the method
    void disableFastTextShift(bool shift) override {}

protected:
    uint16_t get_base_addr(int16_t x, int16_t y) override {
        this->transform_XY(x, y);
        uint8_t pol_y = y % this->pol_displ;
        x += (y / this->DMD_PIXELS_DOWN) * this->WIDTH;

                static const uint8_t Pan_quart_cnt = this->DMD_PIXELS_ACROSS / 4;
                uint16_t base_addr = this->x_len * (pol_y % this->nRows) + (x / this->DMD_PIXELS_ACROSS) * this->DMD_PIXELS_ACROSS * this->multiplex ;
                 if (pol_y < this->nRows)   base_addr += 4;
         base_addr += ((x / 4) % Pan_quart_cnt) * 8 + x % 4;

        return base_addr;
    }

};
miralay001 commented 1 year ago

thank you so much you are a genius :)

https://user-images.githubusercontent.com/108148338/229602195-14904cb3-936e-4257-9b0d-61c950a6731b.mp4

board707 commented 1 year ago

Ben Turkce bilmiyorum...

Please test the pattern with panel chaining and fonts.

miralay001 commented 1 year ago

works well thanks

https://user-images.githubusercontent.com/108148338/229604860-df223c50-3a95-448d-840c-40f51efd6b38.mp4

board707 commented 1 year ago

Great! Good luck to your project!

Please note, that the library has an example with Turkish font: https://github.com/board707/DMD_STM32/tree/dev-V2/examples/STM32F4_RP2040/dmd_rgb_turk

miralay001 commented 1 year ago

2 panel turkish font succesful

https://user-images.githubusercontent.com/108148338/229631839-346e422f-7ab8-429c-b676-d1693ecd84b9.mp4