laptophead
Well-known member
I does show in red in the IDE , so it does exists, but I get a
'class String' has no member named 'split'
Long story short, I am trying to extract values (Floats) from a string based on the space between them
FromTablet = Serial5.readStringUntil('\n'); gets me:
g 117.1 230.0 112.9 180.0 54.8 77.7 112.9 0.0 Is my incoming string ended in a newline
Then I tried
String AngStr[20] = FromTablet.split(" "); ( found it on some forums...)
hoping to get a bunch of baby strings containing my values,
Then I would convert those to Floats such as:
AngStr_float[1] = AngStr[1].toFloat();
etc
Any ideas of the most efficient way to do this?
Thanks
Mitch
'class String' has no member named 'split'
Long story short, I am trying to extract values (Floats) from a string based on the space between them
FromTablet = Serial5.readStringUntil('\n'); gets me:
g 117.1 230.0 112.9 180.0 54.8 77.7 112.9 0.0 Is my incoming string ended in a newline
Then I tried
String AngStr[20] = FromTablet.split(" "); ( found it on some forums...)
hoping to get a bunch of baby strings containing my values,
Then I would convert those to Floats such as:
AngStr_float[1] = AngStr[1].toFloat();
etc
Any ideas of the most efficient way to do this?
Thanks
Mitch
Last edited: