Puedes adaptar el código que se usa para imprimir floats, ese codigo está en el directorio de instalación del Arduino en
arduino-0022/hardware/arduinos/cores/arduino/Print.cpp
La función te quedaría mas o menos así.
printFloat(double number, uint8_t digits)
//digits es el numero de decimales que quieres imprimir
{
// Handle negative numbers
if (number < 0.0)
{
Seriel.print('-');
number = -number;
}
// Round correctly so that print(1.999, 2) prints as "2.00"
double rounding = 0.5;
for (uint8_t i=0; i<digits; ++i)
rounding /= 10.0;
number += rounding;
// Extract the integer part of the number and print it
unsigned long int_part = (unsigned long)number;
double remainder = number - (double)int_part;
Serial.print(int_part);
// Print the decimal point, but only if there are digits beyond
if (digits > 0)
Serial.print(".");
// Extract digits from the remainder one at a time
while (digits-- > 0)
{
remainder *= 10.0;
int toPrint = int(remainder);
Serial.print(toPrint);
remainder -= toPrint;
}
}