This file contains hidden or 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
// Allows for a "print()" function that accepts char* to take any common variable type | |
// Also allows you to detect the type of any variable if that type was first defined | |
// in a MAKE_TYPE_INFO(type) macro | |
// @lixielabs 4/27/22 | |
template <typename t_type> struct type_info { static const char * name; }; // Define type_info | |
template <typename t_type> const char * type_info<t_type>::name = "unknown"; // Set default state | |
#define TYPE_NAME(var) type_info< typeof(var) >::name // Macro to parse variable type name | |
#define MAKE_TYPE_INFO(type) template <> const char * type_info<type>::name = #type; // Macro to define variable type name |
This file contains hidden or 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
const byte score [] PROGMEM = { | |
// YOUR BYTE STREAM GOES HERE! | |
}; | |
const byte voicePins[] PROGMEM = {2, 3, 4, 5, 6, 7}; | |
byte voiceEnabled[6]; | |
byte voiceType[6]; |