Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected extra characters appeared in the IDE Serial Monitor when write to Serial in loop() #146

Open
Silver-Fang opened this issue Mar 6, 2024 · 0 comments

Comments

@Silver-Fang
Copy link

Silver-Fang commented Mar 6, 2024

void setup() {
  Serial.begin(9600);
  Serial.setTimeout(65535);
}
void loop() {
  Serial.println("Snapshot");
  char C;
  Serial.readBytes(&C,1);
}

Upload this sketch in Arduino IDE and open the Serial Monitor. There is a certain probability that unexpected random characters will be generated before normal output.
image
This is not likely an IDE problem because the same code uploaded to Mega2560 does not have this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant