Closed Jesse-Grass closed 3 years ago
Isn't sprintf(tempMessage, "%d.%02d", (int)temp, (int)(temp*100)%100);
a little too complex?
Wouldn't sprintf(tempMessage, "%02d", temp);
do exactly the same?
Sadly sprintf() doesn't format floats on AVR platforms. So I use this little hack to get around this limitation.
Sadly sprintf() doesn't format floats on AVR platforms. So I use this little hack to get around this limitation.
Oh! I didn't know that... it just looked strange. Then go for it.
First gut hub submission, please excuse any inconvenience