Questions tagged [printf]
The printf tag has no usage guidance.
10
questions
0
votes
1
answer
275
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 = "...
0
votes
2
answers
2k
views
Strange behavior from uint32_t, acting like signed int (Nano clone)
I'm having trouble with these variables. As you can see they're uint32_t type, so they should have a maximum value of 4 million or so, but they're rolling over and going negative at 32,767 like a ...
1
vote
1
answer
2k
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, ...
1
vote
2
answers
203
views
Porting the FastNoise c++ library to Due
I'm trying to use the FastNoise library with a Due, however, I get something like the following errors, when I try to complie.
error: 'abs' was not declared in this scope
error: 'mt19937' is not a ...
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;
...
2
votes
3
answers
8k
views
formatting of IPAddress via printf(...) family similar to Serial Object
I am trying to use an sprintf with an IPAddress and I am not sure why Serial.print() is able to convert IPAddress to a reasonable human readable representation. I mean, presumably it uses an ...
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
2
answers
305
views
Using the Logging library, sometimes doesn't exit setup()
This has been a hard problem to diagnose, so I hope I'm giving enough info here. I'm trying to write a program for the Arduino (a lighting controller) using a bit of OO. There are several classes in ...
0
votes
1
answer
397
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?
3
votes
1
answer
1k
views
How to use printf with Arduino's serial ports without an intermediary buffer?
How to use printf with Arduino's streams without an intermediary buffer? The following seems unnecessary:
char buf[256];
sprintf(buf, ...);
Serial.print(buf);
Is there a way to connect ...