Skip to content

Instantly share code, notes, and snippets.

View jbaylies's full-sized avatar
🏠
Working from home

jbaylies

🏠
Working from home
View GitHub Profile
@EleotleCram
EleotleCram / aprintf
Last active April 16, 2023 05:14
Simple arduino formatted printf
int aprintf(char *str, ...) {
int i, j, count = 0;
va_list argv;
va_start(argv, str);
for(i = 0, j = 0; str[i] != '\0'; i++) {
if (str[i] == '%') {
count++;
Serial.write(reinterpret_cast<const uint8_t*>(str+j), i-j);