Serial Out differences Uno/Leonardo


I'm trying to understand serial communications on Arduino boards and would like to understand the difference between an Uno and Leonard/Pro Micro boards

I am working on a project where I send serial data (through the USB port) from an Arduino to a C# program on my computer. I have successfully done this using an Uno board as a test case using the Serial.println command.

For the final version I would like to use a Pro Micro board as I would like a small form factor and also needed more interrupt pins than a Uno/Nano.

So far I have successfully managed to send data from the PC to the pro micro but data going from Arduino to PC does not seem to work. I can confirm that the Arduino is sending the data as I can see it in Arduino serial monitor.

Is there a difference in the default serial output between the UNO and Leonardo boards? If so, is there anything I can change to make the output the same as on an Uno?

Thank you for your help

So re-wrote the C# program with what I thought was the same code, but things seems to work now.

On a Leonardo or Micro you have to wait for the serial connection to be established
before sending data. Some delay before the first send could cover that,
on a strict request reply system it would not be visible too.

It's the dreaded

 while (!Serial) {

that you mostly see in sketches that don't need it.

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