Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement request: please enable sprintf() for float/double, like it's possible in Arduino ARM core #3385

Closed
tofrnr opened this issue Jun 30, 2017 · 3 comments

Comments

@tofrnr
Copy link

tofrnr commented Jun 30, 2017

improvement request:
please enable sprintf() for float/double, like it's possible in Arduino ARM core

char* str[100];
// not possible for AVR and nodeMCU but possible for Arduino ARM core
sprintf(s, "floats: %4.2f %+.0e %E \n", 3.1416, 3.1416, 3.1416); 
@igrr
Copy link
Member

igrr commented Jun 30, 2017

See #1179, this feature is available in 2.4.0-rc1.

@igrr igrr closed this as completed Jun 30, 2017
@tofrnr
Copy link
Author

tofrnr commented Jun 30, 2017

not possible in Arduino IDE 1.8.2 feat. esp8266 board manager
when is it automatically available via Arduino IDE?

@tofrnr
Copy link
Author

tofrnr commented Jan 3, 2018

this program still doesn't work as expected - when and how will it be fixed?

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
  char sbuf[100];
  static int n;
  
  sprintf(sbuf, "%3d %10.8f", n++, PI);
  Serial.println(sbuf);
  delay(1000);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants