Questions tagged [printf]
The printf tag has no summary.
10 questions
0
votes
1
answer
349
views
printf %s gives gibberish
This Code:
String S0 = "";
String S1 = "1";
String S2 = "12";
String S3 = "123";
String S4 = "1234";
String S5 = "12345";
String S6 = "...
1
vote
1
answer
3k
views
How to use a variable format in `sprintf`
How should I make a variable format sequence for sprintf?.
int i=2,d=9;
String sf;
sprintf(sf,"%%0%d",i);
fprintf(sf,d);
While expecting the output.
09
The compilation fails, with several errors, ...
0
votes
1
answer
4k
views
Serial printf implementation
Based on this approach I wanted to implement a function for formatted printing data to the serial monitor. I tried the code below:
int PIN = 12;
void _printf(char *fmt, ...) {
va_list va;
...
3
votes
1
answer
12k
views
Using pointers with Arduino
I am learning about pointers.
I was wondering how the memory address is defined in programming. I get different outputs depending on the format I choose for memory address. So I was wondering if it ...
0
votes
1
answer
450
views
AVR has no vprintf_P?
Well this was unexpected. AVR libc has many the variants of printf, including vprintf, but is missing vprintf_P. Is this really just not present or implemented elsewhere?