Parse data with NthField

Data received from a serial read = 26.50��

I was trying to parse 26.50�� with:

ReceivedData.Text = ArduinoSerial.Readall.NthField("?", 1)

But I’m not sure what to use for “?” to remove ��

Or maybe a better way?

This is a substitute glyph for a non-printable character. It’s probably the end-of-line character sequence.

ReceivedData.Text = ReplaceLineEndings(ArduinoSerial.Readall, "")

That was the fix. Arduino was sending Chr(13) and Chr(10).

I had not used ReplaceLineEndings before. Thanks.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.