Skip to content

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

Open
@Ebola-Chan-bot

Description

@Ebola-Chan-bot
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions