I am trying to convert a float number to a char array.
sprintf() will not work for me and neither will dtostrf.
Since I have a limit in the decimal number (it is 5) I tried this:
int num = f;
int decimales = (f-num)*10000;
Everything worked fine until I typed the number 123.050. Instead of giving me the decimal part as "0.50" it gives me a 5000, because it does not count the 0 now that my "decimal" variable is an int.
Is there any other way to convert it?