user77961: Hello I am new to Arduino and C programming.
I wanted to parse string using sscanf fuction
This is my Program
String hith;
int field1,field2;
float field3;
int F1=0,F2=0;
float F3=0;
int h1,h3;
float h2;

void setup() {
  
  Serial.begin(9600);

}

void loop() {
  field1=5;
  field2=6;
  field3=56.67;
  F1=field1;
  F2=field2;
  F3=field3;

  hith =hith+F1+","+F3+","+F2;
  Serial.println(hith);

sscanf(hith.c_str(),"%d,%f,%d",&h1,&h2,&h3);

Serial.println(h1);
Serial.println(h2);
Serial.println(h3);
  hith="";

  delay(1000);
}

I am only able to Parse Integer values but not Floating points.

user4143: On 8-bit Arduinos support for %f from printf and scanf (and related functions) has been removed to save space.
Instead you should look at parsing the string into chunks with strtok() and use atof() to convert relevant chunks to floating point.

77961: <p>Hello I am new to Arduino and C programming.
I wanted to parse string using sscanf fuction</p>
<p>This is my Program</p>
<pre><code>String hith;
int field1,field2;
float field3;
int F1=0,F2=0;
float F3=0;
int h1,h3;
float h2;

void setup() {
  
  Serial.begin(9600);

}

void loop() {
  field1=5;
  field2=6;
  field3=56.67;
  F1=field1;
  F2=field2;
  F3=field3;

  hith =hith+F1+&quot;,&quot;+F3+&quot;,&quot;+F2;
  Serial.println(hith);

sscanf(hith.c_str(),&quot;%d,%f,%d&quot;,&amp;h1,&amp;h2,&amp;h3);

Serial.println(h1);
Serial.println(h2);
Serial.println(h3);
  hith=&quot;&quot;;

  delay(1000);
}
</code></pre>
<p>I am only able to Parse Integer values but not Floating points.</p>
 4143: <p>On 8-bit Arduinos support for %f from <code>printf</code> and <code>scanf</code> (and related functions) has been removed to save space.</p>
<p>Instead you should look at parsing the string into chunks with <code>strtok()</code> and use <code>atof()</code> to convert relevant chunks to floating point.</p>
