Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Converting Float to String

$
0
0

char final[6];

sprintf(final, "%.3f",current);
Serial.println(final);
 
When I put this code to calculate it prints only the "%.3f"
 
I know floating point is not good to use for MSP430, but I do need the decimal places for my calculated results and need to convert to string pass on java socket.
 
Or Can someone introduce me the fixed point calculation? 
 
many thanks!
 
 

Viewing all articles
Browse latest Browse all 2077

Trending Articles