I want to use sprintf for make a string for displying on a LED-display.
But I have problems with the "format" string.
I have tried "sprintf(A_ans, "%02d %02d %02.2f",I_grader,I_min,F_sec);"
The first two numbers is ok, "%02.2f" is giving me hard time ]
As AWOL indicated, the stdlib (i think it is stdlib) linked in by Arduino does not support floats in the sprintf.
One way around this would be to tinker with Arduino IDE to include the full/extended stdlib to get the float working in sprintf.
Another way is to convert the float using :
dtostrf(floatVar, minStringWidthIncDecimalPoint, numVarsAfterDecimal, charBuf);
Actually it is implemented in the AVR gcc toolset. It is just that the sprintf() provided by default in the AVR libc.a
does not have floating point support (to keep things smaller)
and the Arduino IDE does not allow setting the needed linker options to
to use the floating point version.