I am trying to connect an Arduino Nano ESP32 to a 64x6 LED display. I was able to connect the same display to a different type of Arduino (following these instructions and using the noted board), but I can't seem to get the nano to work. I am trying to use the ESP32-HUB75-MatrixPanel-I2S-DMA library with a basic test implementation (trying to make the display turn all white).
I appreciate any help I can get! Thanks!
Here is my code:
#include <ESP32-HUB75-MatrixPanel-I2S-DMA.h>
#define PANEL_RES_X 64 // Number of pixels wide of each INDIVIDUAL panel module.
#define PANEL_RES_Y 64 // Number of pixels tall of each INDIVIDUAL panel module.
#define PANEL_CHAIN 1 // Total number of panels chained one to another
#define R1_PIN D2
#define G1_PIN D3
#define B1_PIN D4
#define R2_PIN D5
#define G2_PIN D6
#define B2_PIN D7
#define A_PIN A0
#define B_PIN A1
#define C_PIN A2
#define D_PIN A4
#define E_PIN A5 // required for 1/32 scan panels, like 64x64px. Any available pin would do, i.e. IO32
#define LAT_PIN A3
#define OE_PIN D9
#define CLK_PIN D8
MatrixPanel_I2S_DMA *dma_display = nullptr;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
while (!Serial) {
// This loop will continuously run until the serial connection is established
}
pinMode(R1_PIN, OUTPUT);
pinMode(G1_PIN, OUTPUT);
pinMode(B1_PIN, OUTPUT);
pinMode(R2_PIN, OUTPUT);
pinMode(G2_PIN, OUTPUT);
pinMode(B2_PIN, OUTPUT);
pinMode(A_PIN, OUTPUT);
pinMode(B_PIN, OUTPUT);
pinMode(C_PIN, OUTPUT);
pinMode(D_PIN, OUTPUT);
pinMode(E_PIN, OUTPUT);
pinMode(LAT_PIN, OUTPUT);
pinMode(OE_PIN, OUTPUT);
pinMode(CLK_PIN, OUTPUT);
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};
// Module configuration
HUB75_I2S_CFG mxconfig(
PANEL_RES_X, // module width
PANEL_RES_Y, // module height
PANEL_CHAIN, // Chain length
_pins
);
// Display Setup
dma_display = new MatrixPanel_I2S_DMA(mxconfig);
dma_display->begin();
dma_display->clearScreen();
uint16_t myWHITE = dma_display->color565(255, 255, 255);
dma_display->fillScreen(myWHITE);
}
void loop() {
// put your main code here, to run repeatedly:
}
Пользуйся на здоровье)))