sprintf broke?

using Arduino - 0015

This works and returns 12:05 char out[16]; int minutes = 12; int minutes = 5; sprintf(out,"%2.2d:%2.2d",minutes,seconds);

This does not work and returns a "?" (without quotes) char out[16]; float time = 12.05; sprintf(out,"%f",time);


Any Ideas what is up?

Keshka Summerville, Oregon

floats are not supported in the sprintf library used by Arduino.

You can print floats using the print functions in the LiquidCrystal and Serial libraries.

and a there was a routine for creating as string from a float here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1205038401

(did you try to google: arduino sprintf float )

Uh....err....well no I did not do a google of the problem, but I did do a search for sprintf in the Arduino forums and it does not bring up the pages you listed (just did it again to confirm). What is up with that?

Here is one I found with google: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1200716061

search does not find it either.

Keshka