Don't use for-loops or while-loops. Have a look at Robin's Serial Input Basics - updated to get ideas for non-blocking reads of the serial interface.
Further read Demonstration code for several things at the same time ; there are more articles on the web like this one.
Replied within 10 minutes, hope that that is prompt enough ![]()