It doesn't "work" without the delay() because you're only checking to see that you have at least one character to read.
The delay gives you time for the serial line to (hopefully) deliver the rest.
This isn't a good scheme to rely upon.
It doesn't "work" without the delay() because you're only checking to see that you have at least one character to read.
The delay gives you time for the serial line to (hopefully) deliver the rest.
This isn't a good scheme to rely upon.