Hi - I’m evaluating Xojo for an application I’m tasked with writing that communicates with a device over USB/serial. I’ve got a small application running that takes the text in a text box and writes it to the serial port:
If Serial1.Open Then
Serial1.Write(TextToSend.Text + chr(13) )
MsgBox(“The serial port could not be opened.”)
And on DataAvailable event, the serial port writes the received bytes to a different text area.:
TextArea1.Text = TextArea1.Text + Me.ReadAll(Encodings.ASCII)
This is working, communications are going fine back and forth. My issue is that the TextToSend.Text is also being read into the TextArea1.Text. I would have thought the Serial.ReadAll method would only read the receive buffer of the serial port, but I seem to be getting the transmitted data as well, which I do not want. Any advice?