The printf group of functions in the Arduino library don't implement float and double conversions. For those, you need the function
char *dtostrf(double dval, int8_t width, uint8_t prec, char *buf);
Convert the double value passed in dval into an ASCII string stored in
buf. Conversion is done as "[-]d.ddd". The minimum field width of the output
string (including the '.' and the possible sign for negative values) is given
in width, and prec determines the number of digits after the decimal. width
is signed, negative for left adjustment.
Returns buf.
, which you'll need to call for each float you want to convert.
Note that you could convert several floats into strings, upfront, each into its own character buffer, then use sprintf to format the final buffer - remembering that in sprintf
's format string, those buffers contain character strings, which you'll need to specify with '%s' format-specs.