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