- For the December holidays, a seasonal tune may accompany a blue light for Hanukkah or a twinkling star for the top of a Christmas tree.
- The electronics fits easily fits in a moderate or larger size hat.
To use your own remote and differentiate buttons:
- Ensure the serial commands are printing to the Arduino IDE serial console.
- When a sound is playing and you press a button, the hexadecimal number for the key press will be displayed.
- Write that down. Find the others you want the same way.
- Generate code similar to that below (assuming the two hex values represent the codes you wrote down earlier):
char track_name[13]; ... if(results.value == 0xDEADBEEF) { // code was found to be the "1" key track_name="track001.mp3"; } else if(results.value == 0xFEED1234) { // code was found to be the "2" key track_name="track002.mp3"; }
Then to play the correct file, replace
musicPlayer.startPlayingFile("track001.mp3") with musicPlayer.startPlayingFile(track_name)