I am trying to convert a string constructed by the textstring library into a float.
String xstr = String(10);
...
float xwantedpos = float(xstr);
Serial.println(xwantedpos);
...
I get this error message: error: invalid cast from type 'String' to type 'float'
how can I convert these types of strings to floats/doubles.