Hey I am pulling information off the internet and loading it into a string, then attempting to parse out temperature values for a subsequent calculation.
I’ve managed to get the temperature read into a string with this line:
String TempCS = FC.substring(0,FCLOC);
But the following assignment will not compile, even though TempC is declared as a float in the pre-setup assignment block.
float TempC = atof(TempCS);
I get the following error:
error: cannot convert ‘String’ to ‘const char*’ for argument ‘1’ to ‘double atof(const char*)’
Any help converting ‘String’ to ‘const char*’ would be greatly appreciated!