Hi all, I have a problem with the display of the decimals with these FLOAT variables I can only observe tenths and hundredths:
float a=analogRead(A0);
float b=analogRead(A1);
float Voltage1=a*5/1024;
float Voltage2=b*5/1024;
float c =Voltage1 - Voltage2;
float d=c*c;
float k=sqrt(d);
Serial.print("Voltage red= ");
Serial.println(Voltage1);
Serial.print(" ");
Serial.print("Voltage genedor= ");
Serial.println(Voltage2);
Serial.print(" ");
Serial.println(k);
but when placing "double" variables, I still observe tenths and hundredths, what should I do to be able to observe until the thousandths on the serial monitor ??
Many thanks in advance and thanks for your help.