2022年3月6日 星期日

float to ascii code

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.