best meathod to capture serial data?

            for (int k=27; k<n; k+30){

That does not add 30 to k at the end of the loop.