If you did not assign an onData and are relying on the return of the .match()/.receive() calls, then you are using synchronous/blocking mode. The advantage to using async mode is that you don't block the Pronto UI while waiting for 300ms for data to come in.
For a serial port, you can assign callback functions such as onData, onError, onTimeout. If you do this which activates asynchronous mode, then .match() and .receive() operations do not have a return value. Instead, the data is delivered to onData by invoking your callback. In cases where a timeout occurs, the onTimeout callback function is called.
See p. 42, Section 8.2.3 Asynchronous operation
of the 1.4 version of the Dev Guide.
Last edited by Lyndel McGee on May 12, 2021 12:44.