https://github.com/erriez/erriezprintf
printf() library for Arduino
https://github.com/erriez/erriezprintf
arduino documentation examples library port printf serial
Last synced: about 2 months ago
JSON representation
printf() library for Arduino
- Host: GitHub
- URL: https://github.com/erriez/erriezprintf
- Owner: Erriez
- License: mit
- Created: 2018-01-14T15:37:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-08-28T15:56:13.000Z (almost 6 years ago)
- Last Synced: 2025-02-13T03:27:19.010Z (over 1 year ago)
- Topics: arduino, documentation, examples, library, port, printf, serial
- Language: C++
- Homepage: https://github.com/Erriez/ErriezArduinoLibrariesAndSketches
- Size: 301 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Printf() library for Arduino
[](https://travis-ci.org/Erriez/ErriezPrintf)
This library redirects printf() calls to the first serial port.
## Example
```c++
#include
void setup()
{
// Initialize Serial port
Serial.begin(115200);
// Initialize printf
printfBegin();
// Use printf() with string in RAM
printf("Hello world with printf() string in RAM\r\n");
// Use printf() with string in flash
printf_P(PSTR("Hello world with printf() string in flash\r\n"));
// Use printf() to print the variable
int value1 = 1234;
printf_P(PSTR("Value: %d\r\n"), value1);
}
```
**Example output serial port Arduino UNO:**
```c++
Hello world with printf() string in RAM
Hello world with printf() string in flash
Value: 1234
```
## Library documentation
* [Doxygen online HTML](https://erriez.github.io/ErriezPrintf)
* [Doxygen PDF](https://raw.githubusercontent.com/Erriez/ErriezPrintf/master/ErriezPrintf.pdf)
## Library installation
Please refer to the [Wiki](https://github.com/Erriez/ErriezArduinoLibrariesAndSketches/wiki) page.
## Other Arduino Libraries and Sketches from Erriez
* [Erriez Libraries and Sketches](https://github.com/Erriez/ErriezArduinoLibrariesAndSketches)