Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

No Serial Monitor output from certain boards #2772

Closed
Assignees
Labels
topic: codeRelated to content of the project itself topic: serial monitorRelated to the Serial Monitor type: imperfectionPerceived defect in any part of project
@davejel

Description

Describe the problem

using serial monitor to show variables etc does not work i.e.
input string to serial input with the code below should give output on serial monitor, it outputs nothing
I tested this using Arduino 1.8.19 ----- works perfectly
then with Arduino 2.3.6 ------ no output to serial window

To reproduce

note !! return character set to carriage return for this to work

void setup() {
	Serial.begin(115200);
	while(!Serial);
	Serial.println("Serial started");
}
String kbdInput = "";
bool inptrdy = false;
//-------------------
void loop() {
	if(Serial.available()) {
		char c = Serial.read();
		if(c != 13) {
			kbdInput += c; // add c to string
		}
		else inptrdy = true;
		Serial.print("serial ok c: ");
		Serial.println(c);
		Serial.println("kbdInput: " + kbdInput);
		Serial.println("inputrdy: " + inptrdy);
	}
	if(inptrdy) {
		Serial.println("inptrdy true kbdInput: " + kbdInput);
		if(kbdInput == "c") {
			Serial.println("Keyboard commands:");
		}
		else if(kbdInput == "tables") { // print tables
			Serial.println("printTheTables()");
		}
		else if(kbdInput == "restart") { // restart node
			Serial.println("Power On Reset this node");
		}
		kbdInput = "";
		inptrdy = false;
	}
}

Expected behavior

the code above should give output in the serial window when prompted with serial input followed by return

Arduino IDE version

2.3.6

Operating system

Windows

Operating system version

11

Additional context

Related

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

topic: codeRelated to content of the project itself topic: serial monitorRelated to the Serial Monitor type: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /