How to write software Arduino due using both USB ports

Just bought an Arduino Due that I connected as follows:

  • USB programming port is connected to a Windows PC that I use as a monitor and programming device.
  • USB native port is connected to a Ubuntu PC that will be used to carry out higher-level software.

In my C code, I need to separate serial messages to my Windows PC (for testing) from serial data I am sending to the Ubuntu PC.

How can I do that?

Thanks a lot.

https://www.arduino.cc/en/Guide/ArduinoDue#serial-ports-on-the-due has a description of the two ports and how to use / access each of them.

===
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the IDE 1.x category.