Serial, large amounts of data and checking if busy.

Hi people!

In some of my projects, i have to handle high amounts of data. My problem is that i don't know how to do this fast and safe. Some time ago, i made this:

But you can see in the videos, that it is too slow because i'm sending the data with large delays, if I decrease the delays data will be lost.

And now i'm trying to read a 256KB rom with an Arduino and Processing and save this data to a file, yesterday it had taken ~2-3 hours and Ithink that some data was missing.

What i want to know is if there is an generic algorithm to check if the receiver is busy(serial buffer full), so the transveiver stop seding data, so none byte is lost without spending time waiting.

I don't know how to do this, i'm simply shooting bytes at the receiver, can you help me? I'm a hobbist, I learn just what i need to make my projects, but this time i'm not finding uefull and undestandable info.

Thanks in advance. ;)

Look at the examples in serial input basics.

If you want to send very large amounts of data to an Arduino I suggest that you send it in manageable chunks and only start sending a chunk after the Arduino requests it.