Hy, thank you for anwsers. I'm at work right now so I cant send the code. I can tell an example.
Problem is not really i2c part, but serial (chinesse mp3 board).
For example message that sends the filename always starts with MF+ and when I need filename arduino is sending MF+ command and reading the anwser until message that starts with MF+ gets returned.
That is just one example, then I have similar thing for total files on usb drive, number of playing file and so on...
Basicly I want to exit without a message as loop will execute again in a few ms if value wont change...
Basicly I need a timeout because every now and then whole thing freezers and I am almost sure it gets stuck in a while loop.
I will try taterkings idea as it is simple.