SamB
-1
Q:

arduino sprintf float

// On arduino, sprintf does not support formatting floats, but it can be done 
// with some simple integer formatting:
// (Only works for positive numbers)

sprintf(str, "String value: %d.%02d", (int)f, (int)(f*100)%100);
2

New to Communities?

Join the community