This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem using "sprintf" function

Hello, I'm trying to send by UART a float point number. I use "sprintf" to transform it into a string, but the program hangs after sprintf function...

{

float temp = 56.3256;
char stringTemp[7];
sprintf(stringTemp, "%f", temp);
UARTprintf("%s",stringTemp);

}

How can I fix it?

Thank you!