I tried zoomkat's code and it worked. I tried to modify his code for wireless communication and it didn't work. I found out that the Println command adds carriage return and line feed characters to end of string being printed. Do I have to modify the code to look for these characters?

You have this, n = readString.toInt(); but you need to convert it AFTER you get everythingso right I think it is only getting 1 char then it goes to the IF/ELSE and then gets cleared. You don't give it time to get multiple chars.you need a stop char for it to look for like ":" or ";" or "."

If the incoming char is anyone of these, then it know that you have everthing and it should then convert the string to an INT.

I found out that the Println command adds carriage return and line feed characters to end of string being printed. Do I have to modify the code to look for these characters?

I think the readString.toInt() will ignore trailing non neumeric characters. You may be transmitting faster than you are receiving, flooding the receiving buffer. Try a delay like below to slow the transmission to see if the receiving does better. If that works, then you could do some more tweeking.

I wasn't sure what you wanted to do with Processing, but now I see. Arduino might be made from processing but it does not have the same functions as processing. One function in particular is Split(). Arduino does not have it, and that make things harder to break apart incoming strings. So what you(everyone in general) have to do is MAKE a split function using IF statements and Case statements.

This should do exactly what you want to do, get the incoming data, and convert it to an integer.