i was not able to come out of the shock that in Arduino float/double supports only two digits after decimal.! even though it was mentioned 6-7digits of precision including the digits before and after the decimal. can someone help me to overcome this problem.
i wanted to read a value if 0.009, 0.000008 etc...such kindof values...
any help is appriciated..!
I think you are confusing the serial print options for floating numbers Vs the underlining percision of the arduino float variables, those are two very different things.
From the serial reference:
val: the value to print - any data type
format: specifies the number base (for integral data types) or number of decimal places (for floating point types)
So you can see you must supply the format parameter if you want to print for other then the default value of two digits past the decimal point.
As far as the percision of the float type used in arduino, also from the reference section:
Floats have only 6-7 decimal digits of precision. That means the total number of digits, not the number to the right of the decimal point. Unlike other platforms, where you can get more precision by using a double (e.g. up to 15 digits), on the Arduino, double is the same size as float.
You should be able to work out the range and percision of floats you are working with in your sketch with those two key references. Printing for example .00067 should not be a problem, as long as you format your print statement correctly.