Reading Processing String in Arduino

himmelsteht:
As far as the Arduino code goes, there is literally arbitrary code following that, I use it in many of my sketches.

Surprised it even compiles then. Arbitrary code doesn't sound good to me.

Anyway, without seeing the rest of the code (which will include the various type declarations for the variables used in the snippets - which, it may surprise you, are actually important), you won't be getting any more help as there's nothing more to help out with.

himmelsteht:
As the inner while loop specifically keeps checking the incoming chars until the strings match.

So... what happens if there's a communication error, or something else is transmitted?

Anything to stop buffer overruns?

Any way to prevent your sketch from sitting there forever doing nothing?