issues with serial monitor

Genuine Arduino UNO R3 board
The monitor is set at 9600 baud.
This issue is response lag of up to 1 minute before the Monitor responds to a change in the switches when running on beta 3 ver 2
This program with same hardware works in ver1.8.13
The Monitor in ver2 beta 3 will occasionally not show me all the baud rates(drop down opens with 3 choices instead of full options).
The Monitor in beta 3 ver 2 also will not allow me to change the baud rate
My question is, Is it my program or is thsis a bug?

//Practical assignment: 

//Wiring a Binary 7 place Switch - switch has individual pull down 10K resistors

//Output a Decimal number to the monitor

// using an array to watch an 7 place switch

const byte BinaryInput[] = { 3, 4, 5, 6, 7, 8, 9};
unsigned int binary;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
binary = 0;
for (byte x = 0; x < 7; x++)
{
byte value = digitalRead(BinaryInput[x]); //open brace x closed brace 

binary = binary + (value << x);
}
Serial.println(binary, DEC);

}

//byte value = digitalRead(BinaryInput[x]); this line isn't showing correct in message.

array practice.ino (538 Bytes)

oggl:
This issue is response lag of up to 1 minute before the Monitor responds to a change in the switches

Hi @oggl. There is a known issue with the limited throughput of the Arduino IDE 2.x’s Serial Monitor:

The IDE is in a beta development phase and undergoing continuous improvement. I hope we’ll see this situation improved in upcoming releases.

Until then, I would suggest you to modify your sketch so it doesn’t flood the Serial Monitor with absolutely massive amounts of data. I’m sure that if the Serial Monitor could keep up it would be printing so fast that the numbers are unreadable. You could do that by adding a simple delay:

const byte BinaryInput[] = {3, 4, 5, 6, 7, 8, 9};
unsigned int binary;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  binary = 0;
  for (byte x = 0; x < 7; x++) {
    byte value = digitalRead(BinaryInput[x]);
    binary = binary + (value << x);
  }
  Serial.println(binary, DEC);
  delay(200);
}

I appreciate the quick answer. I also apologize for not spotting the previous issue posts.
To avoid the pause, I might rewrite the assignment to only report to monitor when there is a detected change.

oggl:
I appreciate the quick answer.

You're welcome. I'm glad if I'm able to be of assistance.

oggl:
I also apologize for not spotting the previous issue posts.

No need to apologize. Even though we do hope that people submitting formal bug reports on the tracker will first search to avoid duplicates, there is no expectation for people posting here on the forum to search the tracker, or even for them to be aware of its existence. The forum is a great place for less structured questions and discussion. Some of that will result in formal bug reports and feature requests on GitHub, but even if it only ends up in helping someone along in their journey with Arduino that's plenty good enough.

oggl:
To avoid the pause, I might rewrite the assignment to only report to monitor when there is a detected change.

That is definitely the best approach!

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