Chaining P10 32 X 16 , 8S modules

Hi friends, This is my first time using RGB panels .I have 40 panels of P10(SMD-2727 -8S ) 32X16 modules . I want them to arrange in 4 rows and 10 columns .I have stucked in finding library then i got to know about Smartmatrix library .But i dont know how to use the library.I have ESP32 , ESP8266 .My application needs MQTT support so that i can send data from remote location.
Can anyone help me regarding this which library should be used and what are needed . I am making this project for my shop .

My applicayion doesnot need any animations , needs only scrolling text .

Thanks in advance.

HI
32x16 8s are the well known matrices with a simple pattern. Daisy chaining of such matrices is supported by any library that works with RGB panel. For Esp32 you can use Smartmatrix or ESP32-HUB75-MatrixPanel-DMA

will it support 40 panels ?
i mean i read that refresh rate is not enough when we use 40 panels using ESP32?

and does SMART MATRIX library needs teensy module or only ESP32 is enough?

Your paneIs are quite small, 40 panels 32x16 pix are equivalent to only 10 panels 64x32 … After all, if your application need only text data - you can decrease the color depth and get a significant increase in refresh rate.

Thanks for it
now i checked for 16 modules its working fine. :grinning:
suppose if i choose 64X32 of P5 matrix , what changes in hardware i need to do?
will esp32 is enough for it to drive 40 panels?

40 panels 64x32? - I doubt
It would be better to ask the authors about this.

thankyou

Iam not able to scroll the text can you pls once check the following code and any changes?

#include <WiFi.h>
#include <PubSubClient.h>

const char* ssid = “ffdfdf”;
const char* password = “hyfrrd”;
char mqttServer = “test.mosquitto.org”;
int mqttPort = 1883;
const char
mqtt_client_name = “ESPYSssss2111”;
const char* mqtt_pub_topic = “/ys/testpub”; //The topic to which our client will publish
const char* mqtt_sub_topic = “/ys/testsub”; //The topic to which our client will subscribe

WiFiClient client;
PubSubClient mqttClient(client);

#define PANEL_RES_X 32 // Number of pixels wide of each INDIVIDUAL panel module.
#define PANEL_RES_Y 16 // Number of pixels tall of each INDIVIDUAL panel module.

#define NUM_ROWS 4 // Number of rows of chained INDIVIDUAL PANELS
#define NUM_COLS 4 // Number of INDIVIDUAL PANELS per ROW
#define PANEL_CHAIN NUM_ROWSNUM_COLS // total number of panels chained one to another
#define Matrix_width NUM_ROWS
PANEL_RES_X

#define SERPENT true
#define TOPDOWN true

String str=" ";
String str1=“Medplus offers”;

#include <ESP32-VirtualMatrixPanel-I2S-DMA.h>
#include <Fonts/FreeMonoBold9pt7b.h>

MatrixPanel_I2S_DMA *dma_display = nullptr;
VirtualMatrixPanel *virtualDisp = nullptr;

void callback(char* topic, byte* payload, unsigned int length)
{
str=“”;
virtualDisp->clearScreen();
Serial.print("Message received from: ");
Serial.println(topic);
for (int i = 0; i < length; i++)
{
Serial.print((char)payload[i]);
str += (char)payload[i];
}
virtualDisp->setFont(&FreeMonoBold9pt7b);
scroll_text(20,50,str,0,240,255);
// virtualDisp->setTextColor(virtualDisp->color565(0, 0, 255));
// virtualDisp->setTextSize(1);
// virtualDisp->setCursor(6, virtualDisp->height()-20);
// virtualDisp->print(str);
Serial.println("the string is ");
Serial.println(str);
}
void scroll_text(uint8_t ypos,unsigned long scroll_delay, String text, uint8_t colorR, uint8_t colorG, uint8_t colorB)
{
uint16_t text_length = text.length();
virtualDisp->setTextColor(virtualDisp->color565(colorR, colorG, colorB));
for (int xpos=Matrix_width; xpos>-(Matrix_width+text_length*7); xpos–)
{
virtualDisp->setTextColor(virtualDisp->color565(colorR, colorG, colorB));
virtualDisp->setCursor(xpos, virtualDisp->height()-ypos);
virtualDisp->clearScreen();
virtualDisp->setTextSize(1);
virtualDisp->print(text);
delay(scroll_delay);
yield();
delay(scroll_delay/5);
yield();
}
}

void setup() //Setup!
{
delay(200);
Serial.begin(115200);
WiFi.mode(WIFI_STA); //The WiFi is in station mode
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(“.”);
}
Serial.println(“”); Serial.print(“WiFi connected to: “); Serial.println(ssid); Serial.println(“IP address: “); Serial.println(WiFi.localIP());
delay(2000);
mqttClient.setServer(mqttServer, mqttPort);
mqttClient.setCallback(callback);
Serial.println(””); Serial.println(””); Serial.println(“”);

HUB75_I2S_CFG mxconfig
(
PANEL_RES_X, // module width
PANEL_RES_Y, // module height
PANEL_CHAIN // chain length
);

if (NUM_ROWS <= 1)
{
Serial.println(F(“There is no reason to use the VirtualDisplay class for a single horizontal chain and row!”));
}
dma_display = new MatrixPanel_I2S_DMA(mxconfig);
dma_display->setBrightness8(192); // range is 0-255, 0 - 0%, 255 - 100%
if( not dma_display->begin() )
Serial.println(“****** I2S memory allocation failed ***********”);
virtualDisp = new VirtualMatrixPanel((*dma_display), NUM_ROWS, NUM_COLS, PANEL_RES_X, PANEL_RES_Y, SERPENT, TOPDOWN);
virtualDisp->fillScreen(virtualDisp->color444(0, 0, 0));
delay(3000);
}

void reconnect()
{
if (!mqttClient.connected())
{
while (!mqttClient.connected())
{
if(mqttClient.connect(mqtt_client_name))
{
Serial.println(“MQTT Connected!”);
mqttClient.subscribe(mqtt_sub_topic);
}
else
{
Serial.print(“.”);
}
}
}
}
void loop()
{
reconnect();
mqttClient.loop();
delay(500);
//scroll_text(20,50,str,0,240,255);
virtualDisp->drawRect(1,1, virtualDisp->width()-2, virtualDisp->height()-2, virtualDisp->color565(255,0,0));

}

I have created the scrolltext function as scrolling function is not available in virtualdisp