Created
July 7, 2022 16:36
-
-
Save stoph/5cff02301e3cae322adc619a9c473a20 to your computer and use it in GitHub Desktop.
Arduino debugger
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
namespace | |
{ | |
template<typename T1> | |
void debug(T1 v){ | |
#ifdef ENABLE_DEBUG | |
Serial.println(v); | |
#endif | |
} | |
template<typename T2> | |
void debug(String k, T2 v){ // char *k | |
#ifdef ENABLE_DEBUG | |
Serial.print(k); | |
Serial.print(": "); | |
Serial.println(v); | |
#endif | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment