You could try to include Stdio.h into your code "#include <stdio.h>" in here is a function called sprintf and also printf (stands for print formatted) which can be used to print strings in a specified format
See here: http://www.c-for-dummies.com/lessons/float2string/
In here there's a tutorial for working with sprintf where he has a float which is pi, he divides this by 2 and can print it out as a string with the '.'
#include <stdio.h>
int main()
{
float pi = 3.141596;
char halfpie[80];
pi/=2;
sprintf(halfpie, "%f", pi);
printf("Here is the result: %s\n", halfpie);
return 0;
}
This returns
Here is the result: 1.570798
Here's a link for working with sprintf
Also here's the arduino's own page on working with printf and sprintf
http://arduino.cc/playground/Main/Printf
Finally here's a better guide on the parameters ("%s" etc..) for these two functions
http://www.cplusplus.com/reference/clibrary/cstdio/printf/ for printf
http://www.cplusplus.com/reference/clibrary/cstdio/sprintf/ for sprintf
Hopes this helps ![]()