Guys, I want to know if float variables can be used in sprintf() function.
float
sprintf()
Like, if we write:
sprintf(str,\"adc_read = %d \
Isn't something like this really easier:
#include #include #include char str[10]; float adc_read = 678.0123; dtostrf( adc_read, 3, 4, temp ); sprintf(str,"adc_read = %10s \n", temp); printf(temp);