Serial.print stopped working

My Arduino Uno sketch code works fine except that recently the serial.print & serial.println statements no longer work. I'm using the IDE 2.3.0.
What could the problem be?

You don't have the same baud rate set in the code and on the serial motor monitor.

Thanks Paul, but there's no motors - or any other devices connected to the Arduino that require a 9600 baud connection.
Raoul

My apologies. Auto-correct did it's usual great job and I missed it. Corrected now.

Sometimes I must manually open my serial monitor, even with print statements in my program.

Hi,

Thanks for your comment. There is no serial monitor to open. It's the same laptop that sent the code to the Arduino in the first place. To be sure, the serial.print data is going the other way, but there's handshaking going on regardless of the flow of data and there's no indication that the Arduino isn't listening when the sketch is being loaded. The puzzling to me is that it used to work and now it doesn't :slightly_frowning_face:

Raoul

One contradicts the other.

If you are still here... the Serial Monitor can be opened using the "spyglass" icon in the upper-right of the IDE.

You have solved the problem. Apparently at some time previously, I had clicked on that icon and turned off the serial print function. I didn't know what Serial Monitor the instructions were referring to. It now works perfectly - again.
Raoul

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