Hi @Joe, since sscanf is undef when Arduino_STD_PRINTF enabled, and this method parses the string “123” into an integer val, which will then prints the integer value of val. You may just try to print integer straight using:
int val = 123;
Serial.println(val);
Here are another example using atoi to convert string to integer:
const char *input = “123”;
int val = atoi(input); // Avoid sscanf, directly parse integers
Serial.println(val);
Thanks for your answer. However, the code above was only a silly example for demonstration. My real code is of course more challenging: sscanf(arg, "%d %d %d %d %d %c %f %f", &prog, &lfo, &type, &minVal, &maxVal, &mode, &step, &len);
How would you implement this?
Thanks in advance.
Hi @Joe , the bug on the std lib for sscanf was fixed, you may update to the latest early release for 3.1.8-build20250206 and enable Arduino_STD_PRINTF to test on the sscanf. Thank you.