void setup() { String s = "-12.34"; float a = s.toFloat(); Serial.begin(115200); Serial.print(a); } void loop() { }