SerialConnection.ReadAll

From Xojo Documentation

Method

SerialConnection.ReadAll([Encoding as TextEncoding ]) As String

New in 2019r2

Supported for all project types and targets.

Returns all incoming data available in the buffer as a String.

Notes

The optional Encoding parameter enables you to specify the text encoding of the data to be read. Use the Encodings module to specify a text encoding.

Sample Code

While MySerial.BytesAvailable > 0
Var s As String = MySerial.ReadAll
DataBuffer = DataBuffer + s // DataBuffer is a property
MySerial.Poll
Wend