Only 2 decimal places in printed float

By default, the Serial print function shows only 2 decimals, however I'm sure the float has the full (unrounded) value, even if it does not show it.

You can read about it in the official documentation here

With the following code you can use more decimals (fragment from the official documentation):

-Serial.println(1.23456, 0) gives "1" 
-Serial.println(1.23456, 2) gives "1.23" 
-Serial.println(1.23456, 4) gives "1.2346" 

Also, probably the next link (PrintFloat) will help:

PrintFloat

It works roughly by iterating through the digits and printing them.


By default, Serial.print() prints floats with two decimal digits.

float num = 7.875;
Serial.println(num, 4);

will print num with 4 decimal digits, thus: 7.8750.

The precision of float is not decreased in the way you think it decreases. See this answer for a better explanation.