Error RS232 messagebox

Hi everyone, I’m completing my first executable on Xojo and I’m really happy. To my executable I go to connect my Arduino with the serial port. Now, when I go to press a button, Arduino prints a character on the screen. I would like to do something, that is, when I press the button and Arduino does not print anything, I get a messagebox. It’s possible to do it? Such as?

Hi Luka,

The only way to do this is to have the Arduino ACK your message (and every message) the serial port is a one shot system which has no way of knowing that the data has arrived at the other end.

if you send any data to the Arduino you can write code in the Arduino to wait a short period after receiving data and then send back a very simple message to the Xojo code.
if the Xojo code does not see that ACK message then you can put up the message box saying it has failed.

in a simple system you can choose one of two ACK message types, one is a constant message like ‘ack’ or you could echo the same message you just sent and then compare the received data with the last sent message, which is probably a bit more reliable.

It is always important to have an ACKnowledge system in any serial based messaging system because there is no way to know if your data was ever received.

Have fun, I use serial communications in many projects and it can be very reliable with the acknowledge system.