Skip to content

Commit f7ad8a0

Browse files
Fix the issue where the last character was not output on UNO R4 WiFi.
1 parent 4e13f83 commit f7ad8a0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Printf.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ int printf(const char* fmt, ...) {
1515
va_end(arg_ptr);
1616

1717
// output to the serial console through the 'Serial'
18-
len = Serial.write((uint8_t*)buf, (size_t)len);
18+
len = Serial.print(buf);
1919

2020
return len;
2121
}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ This library allows you to output a format string to the serial monitor through
1414

1515
void setup() {
1616
// put your setup code here, to run once:
17-
Serial.begin(9600);
18-
while (!Serial);
17+
Serial.begin(250000);
18+
delay(1000); // `while (!Serial);` is not enough for UNO R4 WiFi
1919

2020
for (float f = 0.0; f <= 1.0 + EPSILON; f += 0.01) {
2121
printf("f = %4.2f\n", f);

0 commit comments

Comments
 (0)