Skip to main content
added 2 characters in body
Source Link
MatMis
  • 177
  • 3
  • 11

I found the .toFloat() but that's not accurate enough.

String StrEx = "57.10598";
float FloatEx = StrStrEx.toFloat();

Serial.println(String(FloatEx)); //outputs 57.11
Serial.println(StrEx);           //outputs 57.10598

I found the .toFloat() but that's not accurate enough.

String StrEx = "57.10598";
float FloatEx = Str.toFloat();

Serial.println(String(FloatEx)); //outputs 57.11
Serial.println(StrEx);           //outputs 57.10598

I found the .toFloat() but that's not accurate enough.

String StrEx = "57.10598";
float FloatEx = StrEx.toFloat();

Serial.println(String(FloatEx)); //outputs 57.11
Serial.println(StrEx);           //outputs 57.10598
Source Link
MatMis
  • 177
  • 3
  • 11

How to convert String to Double?

I found the .toFloat() but that's not accurate enough.

String StrEx = "57.10598";
float FloatEx = Str.toFloat();

Serial.println(String(FloatEx)); //outputs 57.11
Serial.println(StrEx);           //outputs 57.10598