Mac OS 13.5.1 doesn't like "9" in IDE 2.x

I am actually not sure where to post this, so please forgive me if this is the wrong place. I looked for this issue in the forum and with google to no avail.
I run IDE 2.21 on a Macbook Pro running OS 13.5.1
I cannot print the number nine in the Serial Monitor! The program compiles and loads just fine. But when it needs to print "9", it simply prints a dash. This happens whether or not the character is ascii or an interger.

The code:


int x;
int y;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
 Serial.print("9");  // "9" printed as an ascii character
 x = 5;
 y = 4;
 Serial.println(x + y);  // "9" printed as an interger
 delay(999);
 }

When I run this (on a Nano, I have not checked with other boards), I simply get a series of dashes like this:
__
__
__
__
__

HOWEVER - if I copy the output and paste it here, the nines show up just fine.
99
99
99
99
99

Thoughts on this very strange anomaly, anyone? Thank you in advance!
Dave

Hi @hikerdave. I don't have any idea what could cause this and I can't reproduce the fault on my own macOS machine. However, there was one previous report of the same bug:

Interestingly, they are also using macOS. That seems like maybe more than a coincidence because in my experience the great majority of forum users are on Windows.

If you are interested in doing a bit of investigation, I can provide some instructions you can follow to at least get an idea of whether the fault is in the Arduino IDE application itself, or in the helper tool that provides the communication between the Arduino board's serial port and the Serial Monitor GUI in the IDE. That would be quite interesting to know, but I can't promise that it would actually lead to a solution.


As a workaround for this bug, you can use an external serial terminal application. You would need to remember to disconnect that external terminal from the board before uploading, otherwise the terminal program's control over the port will cause the upload to fail. Arduino IDE is able to do that automatically with the integrated Serial Monitor.

I don't use macOS a lot so I don't have any suggestions for a specific terminal application, but I'm sure there are some good free open source applications available. The other helpers here on the forum might be able to make a suggestion.

Thanks so much for the quick reply! I onviously did not see this other post - thank you for bringing it to my attention. The issue is one of mere annoyance for me, as this is my hobby and can mentally substitute the 9 for the -. But it is perplexing!

I appreciate yoyr offer of guidance, but far too many times I have learned (and re-learned!) that if it is working, I shouldn’t try to “improve” it! :wink:

1 Like

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