Skip to content

Instantly share code, notes, and snippets.

Created April 9, 2012 14:02
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jmccrohan/2343665 to your computer and use it in GitHub Desktop.
static float floatvar = 12345.67;
static char sprintfbuffer[15];
static char dtostrfbuffer[15];
void setup() {
sprintf(sprintfbuffer,"%f", floatvar);
dtostrf(floatvar,8, 2, dtostrfbuffer);
Serial.print("sprintf: ");
Serial.print("dtostrf: ");
void loop(){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment