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

arduino-cli monitor does not flush characters until \n is typed #2251

Closed
Assignees
Labels
type: imperfectionPerceived defect in any part of project
@cshamis

Description

Describe the problem

I was trying to debug my Serial.read() routines and couldn't figure out what I was doing wrong. None of my keypresses were getting through to my program. Then I hit enter ... and they ALL came through.

After much reading about line endings in the terminal (not applicable here) I tried using screen to directly connect to the serial port. Screen sends the characters as they are typed, and my program works fine.

Is the arduino-cli monitor buffering until a newline intentional? Or a bug? Or just not well documented? Or... maybe something else.

To reproduce

void hardwareUART() {
int charIn = Serial.read();
if (charIn == -1) {
return;
}
Serial.print(charIn);
}

Expected behavior

When typing in a bidirectional terminal, characters are sent as typed. Not buffered until newline.

Arduino CLI version

0.33.1

Operating system

macOS

Operating system version

Ventura 13.4

Additional context

No response

Issue checklist

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

Metadata

Metadata

Assignees

Labels

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 によって変換されたページ (->オリジナル) /