I want to have a function that holds program execution until a specific string (XX) is seen on the serial port, but, also have a timeout of 5 seconds if that string is not seen. Multiple and may be seen before the XX which is where I am having problems. Also need a return value from the function saying whether or not the string was found.
Is there something built in that I can use already or do I need to write the function from scratch?
Thanks