Arduino due Native USB port faliure

Hello, I'm not able to write some bytes to the Due native usb, I'm using Programming USB to program the Arduino, so the Native USB is free.

I'm trying to init the port with the following statements,
but the while loops infinitely;
SerialUSB.begin(9600);
while (!SerialUSB);

The Native USB seems to be unavailable

Can you suggest me haw proceed.
Thank you
regards

Norberto

If the native port is not connected to a computer, while (!Serial); turns into an infinite loop. The same happens if you use a USB cable without data wires. Most free USB cables do not have data wires so can only be used for charging. The only exceptions are cables included with phones and tablets. Keep trying different USB cables until you find one that works. The cable connected to the programming port must have data wires since upload works. But you need two good cables.

I did a check, I used Native USB to program the Arduino, with the same cable, the programming was executed with success, so I'm thinking my USB cable should be OK.
In any case I will bay a new one USB cable.
Have you any other suggestion for me?
Thanks again.

Hello
Run one of the Arduino due tutorials.

If you have two good cables, try removing the while (!SerialUSB). Maybe it does not work.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.