problem to read whole 255 bytes char string receving from serial monitor

i’m trying to read 255 bytes from serial monitor .
i have use arduino uno r3 board.
and coonect p10 module.
i was try to receive 255 bytes and send on display but it is not working(ie. not receive string.)

if i take size of sting below 200 then it’s working.

my code is

#include <SPI.h>
#include <DMD.h>
#include <TimerOne.h>
//#include <stdio.h>
//#include <ledp10.h>
#include “Arial_Black_16.h”<Arial_Black_16.h>
// you can remove the fonts if unused
#include “SystemFont5x7.h”
#define DISPLAYS_ACROSS 13
#define DISPLAYS_DOWN 1
//#define DISPLAYS_BPP 1
//#define WHITE 0xFF
//#define BLACK 0
/* change these values if you have more than one DMD connected */
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);

int clearvar = 0;
char stringa[255];
char current ;
int i = 0;
int c = 0;

void ScanDMD()
{
dmd.scanDisplayBySPI();
}

void setup()
{
Timer1.initialize( 5000 );
/period in microseconds to call ScanDMD. Anything longer than 5000 (5ms) and you can see flicker./

Timer1.attachInterrupt( ScanDMD );
/attach the Timer1 interrupt to ScanDMD which goes to dmd.scanDisplayBySPI()/

dmd.clearScreen( true );
/* true is normal (all pixels off), false is negative (all pixels on) */

Serial.begin(9600);

}

void loop() {
// Read line from Serial
memset(stringa, 0, sizeof(stringa)); // set string contents to zero
Serial.setTimeout(1000); // second input timeout
i = Serial.readBytesUntil(’\n’, stringa, sizeof(stringa)-0); // Read line of input
if(i > 0) { // Display line if anything was read
Serial.println(stringa);

dmd.clearScreen(true);
dmd.selectFont(SystemFont5x7);
dmd.drawString( 0, 0, stringa , strlen(stringa), GRAPHICS_NORMAL);
dmd.drawString( 0, 8, stringa , strlen(stringa)+70, GRAPHICS_NORMAL);
}
}

please, reply & help to solve this problem.

What have you got the Line ending set to in the Serial monitor ? What do you see when you print stringa on the Serial monitor ?

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data.

In the examples the expected maximum number of characters is 32, but you can change that to any number you like. If you go over 255 make sure to change from byte to int.

Note that you will almost certainly need at least 256 spaces to receive a 255 character message as you also need space for the terminating NULL.

...R