Skip to content

Commit

Permalink
Fix the issue where the last character was not output on UNO R4 WiFi.
Browse files Browse the repository at this point in the history
  • Loading branch information
embedded-kiddie committed May 24, 2024
1 parent 4e13f83 commit f7ad8a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Printf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int printf(const char* fmt, ...) {
va_end(arg_ptr);

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

return len;
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ This library allows you to output a format string to the serial monitor through

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

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

0 comments on commit f7ad8a0

Please sign in to comment.