atof(fb) -> gives 0.12
tmpStr.toFloat() -> gives 0.12. This is only available in Arduino 1.5.2 Beta. According to the author, it should return 6 decimals. i only get 2 decimals
The only thing that works is:
String(tmpStr.toFloat(),6) -> 0.1234
But, the result is back to String, where we first started!
atof(fb) -> gives 0.12
tmpStr.toFloat() -> gives 0.12. This is only available in Arduino 1.5.2 Beta. According to the author, it should return 6 decimals. i only get 2 decimals
The only thing that works is:
String(tmpStr.toFloat(),6) -> 0.1234
But, the result is back to String, where we first started!
Any ideas?
How are you viewing the value of the float?
p = 0.123456789;
Serial.begin(9600);
Serial.println(p, 6)