How to truncate the buffer value from the function ftoa.

I am using the ftoa function to convert a floating point number to a character string to send out over the RS-232 link to a LCD display. The function returns an exponent of 10 to compansate for the string. However the string cannot be raised to a power because its a int, float etc. How would this be accomplished using this function. Is their a better way to perform this conversion?
I thought about using an array and converting each digit of the floating point number to a character.

DC 10.72
2x16 LCD display (NewHaven)

Bloat-city…but how about:



Then use appropriate modifiers.


Use the below code, then send the each character from the buffer.

float myFloat = 3.23;
char myString[30];
sprintf(myString, “%f”, myFloat);


1 Like