Arduino DUE Serial Monitor still doesn't work

I've had this problem for years. Years ago I was forced to downgrade the project to using an Arduino Nano. I was hoping it was fixed by now, but no. This exact same code works fine on a NANO, I see blinking and I get output on the serial monitor. Try it on a DUE and I see the blinking, but NO output on the serial monitor. We in the community would like to be able to use the DUE but it seems we are being throttled. I use pins 20/21 on the DUE and A4/A5 on the NANO. Ultimately I want to connect to the 9250 but cannot communicate with that using a DUE, but can with a NANO, but subsequent processing is slower and not feasible.

void setup()
{
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
}

int cntr={0};
void loop()
{
Serial.println(cntr++);
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

It's the standard blink example with a simple print command.

Any throttling is of your own making.
I just tried this code on my Due and it works correctly, despite the odd use of the "ctrl" variable.

should be just

int cntr = 0;

Did you plug it into the programming port?
Did you select the programming port from the drop down menu when you choose your board type?

I am using the Native USB port. When I try to use the programming port I get a message about no device found. Previous research led discussions about being because of an incorrect resistor value at R23. Rather than try the "solder a 1k surface mount resistor" fix I just use the Native port. I cannot solder that small. Yes, board and port (native) are selected in the IDE.

This suggests you have a none working Due. As I said it works fine on mine.

Then you should use SerialUSB and add

while (!SerialUSB) {}

after Serial.begin() to make sure you won't lose any output.

I may very well buy a new DUE and see if that fixes the problem, but this one does everything BUT communicate over serial. It blinks on command.

Have you checked that the lead is OK?

You might want to look at this thread
native port

It seems that you have to load the code over the programming port and then switch to the native port for running the code on the native port.
This is what the setup function should be:-

//Serial.begin(115200); // don't do this if you want to use the native port for the faster direct USB connection.
SerialUSB.begin(115200);    // Initialize Native USB port
while(!SerialUSB);           // Wait until connection is established

It seem you can't program the Due over the native port.

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