Created
April 9, 2018 20:37
-
-
Save marcelstoer/2ba116bcb3546fffcc274b9c8518ec2b to your computer and use it in GitHub Desktop.
Arduino uint64ToString
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// source: https://github.com/markszabo/IRremoteESP8266/blob/master/src/IRutils.cpp#L48 | |
String uint64ToString(uint64_t input) { | |
String result = ""; | |
uint8_t base = 10; | |
do { | |
char c = input % base; | |
input /= base; | |
if (c < 10) | |
c +='0'; | |
else | |
c += 'A' - 10; | |
result = c + result; | |
} while (input); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment