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
The following "echo sketch" does not work as expected after #1953
void setup() {
Serial.begin(9600);
while (!Serial);
}
void loop() {
if (Serial.available()) {
Serial.print('-');
Serial.print(Serial.read());
Serial.print('-');
}
}
It should print the code of each character given as input, sorrounded by two hyphens.
When started, you should see a blank IDE serial monitor. As soon as you type something, like "a", you should see printed -97--10- (when using new line as line terminator)
Instead serial monitor will immediately display -0-, like I had given the null char as input.
Commenting line while (!Serial); prevents the error from happening.
This has been verified with a yun and with a leonardo
Adding some details: I've used IDE from both ide-1.5.x and ide-1.5.x-avr-toolchain-gcc-4.8.1 branches
By reverting merges 82fe44d and 36331fa regression disappears.
The following "echo sketch" does not work as expected after #1953
It should print the code of each character given as input, sorrounded by two hyphens.
When started, you should see a blank IDE serial monitor. As soon as you type something, like "a", you should see printed
-97--10-
(when using new line as line terminator)Instead serial monitor will immediately display
-0-
, like I had given the null char as input.Commenting line
while (!Serial);
prevents the error from happening.This has been verified with a yun and with a leonardo
/cc @pbrook @embmicro @cmaglie
The text was updated successfully, but these errors were encountered: