You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
cshamis
changed the title
arduino-cli monitor does not "send" characters until \n is typed
arduino-cli monitor does not flush characters until \n is typed
Jul 25, 2023
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
The text was updated successfully, but these errors were encountered: