Serial com between arduino mega 2560 and atmega 328p(arduimu v3)

PaulS:

#define rx 19

Serial1.begin(38400);
  pinMode(rx, INPUT);



You told the Serial1 instance that it could use the pin. Then you diddle with the pin. Why?

You are sending data to the 328's serial port faster than the mega can read it and print it. After a while the buffer fills up, and data gets lost.

I am really blur @@
Is there any way I can deal with the data handling?
Please help, thanks!