hi, doing a simple multiplication function. but cannot get the decimal places to print
e.g. s= 2.2*9.8
result should be 21.56
Serial.println(s,2) produces binary
Serial.println(s,DEC) produces 18
many thanks
hi, doing a simple multiplication function. but cannot get the decimal places to print
e.g. s= 2.2*9.8
result should be 21.56
Serial.println(s,2) produces binary
Serial.println(s,DEC) produces 18
many thanks
I think that "s" is not a "float" or a "double"
thanks
now getting 21.00
do i need to multiply by power of 10 to preserve fraction?
I think the number of decimal places thing for the print method was only from 0018.
Which version are you running?
Can you post your code, please?
got it working thanks for your help