Each day a new problem :-(

Hi,

I have ONE board Adafruit Feather M0 connected to my computer, only O-N-E . And it is connected to COM11.

Some minutes before, Arduino IDE 2.0rc decides to see the board also at COM1. :unamused:

I can switch to COM11, but each time I open Serial Monitor it switches back to COM1. If I switch to COM11 and push reset button of the board ... yes, it switches back to COM1. No way to see output.

IDE2-COMport

To all programmers of IDE: I can understand, that it is difficult to build a large program, but this is not a release candidate.

I will now uninstall this software. May be I try a version 2.1 or 2.2, but for the moment it is wasting my time and makes me angry.

Bye
Jürgen

Hi @bastler59. I'm sorry for the trouble with the Arduino IDE 2.x release candidate.

I have experienced something similar to this, and submitted a report for the problem I had to the developers here:

That report also contains links to other problems related to the automated port selection behavior.

I didn't manage to reproduce the issue you reported of the Serial Monitor causing the port change though. I don't own an Adafruit Feather M0 so there may be some special property to that board that causes it to reset when the Serial Monitor is opened, and I do know that any reset will trigger this port change.


There are two possible causes of this issue in general:

  • You have multiple of the same board connected to your computer (I realize this isn't the case for you @bastler59)
  • You only have one board, but the Arduino IDE has associated it with multiple ports.

In case it will be of use to anyone experiencing this problem, I'll share workarounds.


The former cause will probably only be possible to work around by disconnecting one board.


The latter cause can be worked around by disassociating the board from the port:

  1. Select the unwanted port (in this case, COM1) from the Tools > Port menu in the Arduino IDE.
  2. Select any other board from the Tools > Board menu in the Arduino IDE.

Doing this removes the association between that port and the board you are using so that the problematic automatic selection will no longer occur.


For the moment, it is working with a Arduino UNO at COM1.

Some other things:

  1. Strg+Shift+M should open serial monitor? Not on my computer, I have to open it by the menu.
  2. I set serial monitor to "both NL&CR". But when I mark some lines and copy them to Notepad++ it is all in one long line.

Jürgen

It works fine for me. From "Strg", I am guessing you have a German keyboard layout? I wonder if that is relevant.

Have you made any changes to the "Toggle Serial Monitor View" setting in File > Advanced > Keyboard Shortcuts?

The line ending menu in Serial Monitor controls the line endings that are added to the text you send via the input field. It does not affect the line endings in the output field. You should get the same line endings there no matter what the input line ending setting.

I suspect that this is one of the things that will be resolved automatically by the planned complete reworking of the Serial Monitor, as described here:

but you are welcome to submit a dedicated formal bug report about it on the issue tracker. I already checked for an existing one and didn't find anything relevant.

The current Serial Monitor must be using some odd encoding because I do get line breaks when I paste the data here in a forum reply, only I get doublespaced output!

There are other reports of this annoying bug here:

Hi,

letter "M" is on the same place in german and english keyboard. Hmm ... crazy ... just in the moment combination Strg+Shift+M is working.

Another question:
Is there a maximum capacity of bytes that serial monitor can handle? May be about 30 kBytes?
I have a sketch using interrupt. Interrupt comes from a RTC every minute. Then sketch reads sensor values and writes something to serial monitor. There is no variable counting up, so no overflow should occur. After 3,5 hours sketch stopped, IDE shows a "not connected". I tried it 2 times. Then I changed sketch, so it is writing less output. Sketch stopped after 8 hours.
[addendum]
Writing on a sd-card doesn't solve the problem. It must be another problem with interrupt.

Jürgen

Please let us know if you run into the problem again, especially if you can discover the specific conditions that cause the issue.

I haven't been able to reproduce it.

Does it occur for you with a minimal sketch like this?

unsigned long x;
void setup() {
  Serial.begin(115200);
  while (!Serial) {}
}
void loop() {
  Serial.println(x++);
}

That should exceed your hypothesized 30 kB limit very quickly, yet I have been running it for hours without any problems.

First I thought, there is a correlation between crashed sketch and serial monitor of IDE. But if I write data only to SD-card, sketch also crashes.

I think it is my mistake, that I placed all code inside ISR. 60 seconds are a long timespam, so no need to keep ISR-code short and fast. delay() is not working inside ISR and each sensor library uses it, because sensor needs time to put values into registers. In one case I could solve this problem by code stretching command. But I'm afraid there are other libraries using delay(). For some hours sketch may run without a problem and then timing is slightly different and sketch crashes.

Now I have code back in loop() and sketch is running for more than 40 hours.

Jürgen

I'm glad to hear this!

I went ahead and submitted a report about this:

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