Send a large number of data

Hi guys I am trying to send a large number of Data from my ARDUINO MICO to my PC APPLICATION
it is abou t 1003 bytes (1kb)

what is the best was to do so ? because the below code i snot working for me

if(Serial.availableForWrite()){
        CalReturn =new byte[CalDataSize];
        for(int i=0 ;i<CalDataSize;i++){
            CalReturn[i] = EEPROM.read(i);
        } 
        BLINK(13,100,5);
       // Serial.write(start);           
        Serial.write(CalReturn,CalDataSize);
        BLINK(13,50,5);
        Serial.flush();           
    }
    delay(10);

Why do you read everything into memory if it’s already available in EEPROM? I guess you have memory problems but without complete code that stays a guess.

how to you receive the data on the PC?
what is displayed?
are you reading as characters or bytes?
of you use realterm terminal emulator you can display byte values in decimal or hex
RealTerm

When something is not working, try to make it simpler. Why make it hard when it can be done in an easy way ?
Forget the blinking and the heap and the flush and the delay and all of that. The Arduino Micro has a small microcontroller. Keep it simple.

for(int i=0 ;i<CalDataSize; i++)
{
  Serial.write( EEPROM.read(i));
}

No data will be lost. The Serial.write() will wait if the TX buffer inside the Serial library is full. Since reading the EEPROM takes some time, perhaps the Serial.write() does little waiting or no waiting at all. The Arduino Micro does not really use the baudrate, the data is transmitted via the USB cable at a very high speed because the Arduino Micro has the virtual serial port inside the microcontroller as a USB CDC device.

Calling new without calling delete just guarantees that you will very quickly run out of SRAM.

THanks guys, Yes it was a memroy issue.
yes you are right it take time to read from the EEProm it is not as fast As I thougt, so I actually created a different function that reads the data at the SETUp() only becasue the EEPROM doesn't change then I just serial.write(data).

Thanks guys