Skip to content

Instantly share code, notes, and snippets.

@smetronic
Created December 16, 2017 12:21
Show Gist options
  • Save smetronic/e839d2388728fe178f2a985e3234b3b4 to your computer and use it in GitHub Desktop.
Save smetronic/e839d2388728fe178f2a985e3234b3b4 to your computer and use it in GitHub Desktop.
ATMega 328p: sprintf
unsigned int i = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
char buffer[50];
sprintf(buffer, "Value: %x", i++);
Serial.println(buffer);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment