Having this basic example for using the SerialUSB
function on the Arduino Due under Windows:
// ARDUINO DUE BLINK LED
void setup(){
pinMode(13,OUTPUT);
SerialUSB.begin(2000000);
while(!SerialUSB){
digitalWrite(13,HIGH);
delay(100);
digitalWrite(13,LOW);
delay(100);
}
}
void loop(){
SerialUSB.println("Hello, World!");
digitalWrite(13,HIGH);
delay(100);
digitalWrite(13,LOW);
delay(900);
}
I am having trouble understanding which shall be the operating sequence for this use. Normally I follow these steps:
- Open Arduino IDE, select Arduino Due (Programming Port) at COM 01, and connect it to PC USB,
- Compile and Upload the code,
- Open a Serial Monitor App, with COM 02, 2000000 bps or 9600 bps, 8b data, 1b stop, no parity, RTS|CTS flow control.
If I keep the Arduino connected to the Programming Port after trying the Native USB Port, I have to disconnect and connect everything to program it again (??), or disable it through the windows Device Manager.
Which is the proper sequence (and perhaps the code) for doing this the right way?.