Hello guys!
I have used Xojo serial communication over USB to different Arduino platforms for over ten years but now I am stuck.
The task is pretty straight forward: Send some ascii bytes to the Pico and then recieve the reply from the Pico.
Edit: The strange behavior can only be seen when communicating with Pico on Arduino. For another device, both type of serial connections work as expected.
End edit.
I have tried this with both the Xojo SerialConnection and the MBS SerialPort. Here is what happens:
Xojo SerialConnection: The port opens without problems and the string is successfully sent using SerialConnection.Write. The Pico sends a reply but the DataRecieved event does not fire. When I close the SerialConnection and then opens the Arduino Serial Monitor the reply from the Pico turns up there.
MBS SerialPort: The port opens without problems and the string is successfully sent using SerialPort.Write. The Pico sends a reply but the DataAvailable event does not fire. When I close the SerialConnection and then opens the Arduino Serial Monitor the reply from the Pico turns up there.
So far the same behavior for both.
Here comes the mystery:
With the MBS SerialPort, after just opening and closing the connection with the Arduino Serial Monitor (not writing anything), everything just works fine! That is everything works until I restart the Pico. After a restart we are back to not working, until I open and close the connection with Arduino Serial Monitor again.
However the opening and closing with the Arduino Serial Monitor does not have any effect on the Xojo SerialConnection. It still does not fire its DataRecieved event.
What is it that the Arduino Serial Monitor does that makes the communication work? Some kind of reset? Something related to the control signals?
I run Xojo 2022r2 on W11 pro
Wanted to upload example projects but don’t know how.