sprintf() can be used to convert float to ascii. It's simple and only need the following several line code.
Ex:
char str[6];
float x=23.58;
sprintf(str,"%f",x);
According to the application,the ascii code can be transmitted to the output from uart interface.
沒有留言:
張貼留言