I have a string that looks like this "10.00,20.00,-50.00," in which these are angle values and they have 2 decimals and can be negative. I want to separate them into 3 separate floats. Here is my current code in which I use sscanf. All I get is 0.00 and have no idea why. Any help is truly appreciated.
String recvString = "10.00,20.00,-50.00,";
float r,p,y;
void setup() {
Serial.begin(9600);
Serial.println(r);
int result = sscanf(recvString.c_str(), "%f,%f,%f,", &r, &p ,&y);
Serial.println(r);
}
void loop() {}