float foo;(snip)printf("%2.2f", foo);
Since the full implementation of all the mentioned features becomes fairly large, three different flavours of vfprintf() can be selected using linker options. The default vfprintf() implements all the mentioned functionality except floating point conversions.If the full functionality including the floating point conversions is required, the following options should be used: -Wl,-u,vfprintf -lprintf_flt -lm
Arduino IDE is doing it for me and I don't see any way within the IDE to change the linker options.
The %f format specifier is not supported on the Arduino. A few seconds searching would have revealed a variety of alternatives.
char s; float val=12.34; char width=8,prec=1; dtostrf(val,width,prec,s);Serial.println(s);
There's a function called dtostrf that might be what you need.