Yes, bufferUntil() works for any 1 value within range 0 to 255.
As mentioned in its reference, its purpose is to specify which value stops the buffering of receiving bytes before invoking serialEvent():
Thanks for the reply. I have been struggling with the references that you mentioned. I think that I need to simplify my code and post it under "Questions about code". My problem is that the stop character is not white space and it appears only once in the serial stream.
I think that I need to simplify my code and post it under "Questions about code".
If we need an external library to run any posted code, or it demands some non-conventional hardware, it can't go to "Questions about code" section. 3:-O
Answers
Yes, bufferUntil() works for any 1 value within range 0 to 255.
As mentioned in its reference, its purpose is to specify which value stops the buffering of receiving bytes before invoking serialEvent():
And once within serialEvent(), use readString() to get the full buffered bytes as 1 String:
https://Processing.org/reference/libraries/serial/Serial_readString_.html
P.S.: The stop value is included in the buffer too. That's why it's advisable to use trim() over it: L-)
https://Processing.org/reference/trim_.html
Thanks for the reply. I have been struggling with the references that you mentioned. I think that I need to simplify my code and post it under "Questions about code". My problem is that the stop character is not white space and it appears only once in the serial stream.
If we need an external library to run any posted code, or it demands some non-conventional hardware, it can't go to "Questions about code" section. 3:-O