diff --git a/lib/led-matrix-32-16/led-matrix-32-16.cpp b/lib/led-matrix-32-16/led-matrix-32-16.cpp index 88287a3..b65b395 100644 --- a/lib/led-matrix-32-16/led-matrix-32-16.cpp +++ b/lib/led-matrix-32-16/led-matrix-32-16.cpp @@ -61,8 +61,10 @@ LedMetrix32x16::LedMetrix32x16() _pins.clk = CLK_PIN_DEFAULT; } -void LedMetrix32x16::begin(int nRow, int nColl, int res_x, int res_y, PANEL_CHAIN_TYPE chain_type ) +void LedMetrix32x16::begin(int nRow, int nColl, PANEL_CHAIN_TYPE chain_type ) { + int res_x = 32; + int res_y = 16; HUB75_I2S_CFG mxconfig ( res_x * 2, // width of a single panel res_y / 2, // height of a single panel diff --git a/lib/led-matrix-32-16/led-matrix-32-16.hpp b/lib/led-matrix-32-16/led-matrix-32-16.hpp index f6c3d91..2d3f8ee 100644 --- a/lib/led-matrix-32-16/led-matrix-32-16.hpp +++ b/lib/led-matrix-32-16/led-matrix-32-16.hpp @@ -24,7 +24,7 @@ private: public: LedMetrix32x16(); LedMetrix32x16(HUB75_I2S_CFG::i2s_pins _pins); - void begin(int nRow, int nColl, int res_x, int res_y, PANEL_CHAIN_TYPE chain_type = CHAIN_BOTTOM_RIGHT_UP); + void begin(int nRow, int nColl, PANEL_CHAIN_TYPE chain_type = CHAIN_BOTTOM_RIGHT_UP); inline MatrixPanel_I2S_DMA * getDisplay() { return dma_display; } // return pointer to the DMA display object inline CustomPxBasePanel * getVirtualDisplay() { return virtual_display; } // return pointer to the virtual display object diff --git a/src/main.cpp b/src/main.cpp index e592d70..9daa1b4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,7 +6,7 @@ LedMetrix32x16 ledMatrix; // Create an instance of the LedMetrix32x16 class void setup() { Serial.begin(115200); // Initialize serial communication for debugging - ledMatrix.begin(1, 3, 32, 16); // Initialize the LED matrix with 1 rows and 3 column of panels, each panel being 32x16 pixels + ledMatrix.begin(1, 3); // Initialize the LED matrix with 1 rows and 3 column of panels MatrixPanel_I2S_DMA *display = ledMatrix.getDisplay(); // Get the DMA display object display->setBrightness(50); // Set the brightness of the display to 50% }