Fix rounding error and replace sprintf() by Serial.Print() for better cross platform support.
The error observed on a MKRZero was due to the fact that the sprintf function doesn't support float (%f) with all MCUs. RP2040 support it but apparently not SAMD21 and AVR based Arduino boards. New code should be supported by all Arduino boards.