We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [printf]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
30 views

First sprintf-call works, second (identical) does not

In my current project I'm using an Arduino Nano, an RTC-Module, SD-Module and an OLED-Display to log time-values. I'm currently trying to implement following function: char *onString = (char*)...
1
vote
1answer
204 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
2answers
98 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
1answer
2k 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; ...
0
votes
2answers
3k 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 ...
2
votes
1answer
6k 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
2answers
258 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 ...
-1
votes
1answer
199 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
1answer
909 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 ...