As part of my Kiosk project I wanted to add sound feedback when a child scans their tag. I found tone() in the documentation and I’ve made the example usage work inline with scanning the RFID tags.
Then I found this awesome post on making a Remote RTTTL song player, but I’m confused since it says it doesn’t use tone()
, then later on in the discussion @BDub and @zenvisuals discuss incorporating the library because tone()
is now in the firmware? Not sure if these means you can do RTTTL with tone()
now, or not?
If it doesn’t that’s cool, but how would or where can I find a way replicate the RickRoll RTTTL song using
tone()
? And if it does, well I’m still confused.
Thank you!
RickRoll from the RTTTL post
//char *song = (char *)"RickRoll:d=4,o=5,b=200:8g,8a,8c6,8a,e6,8p,e6,8p,d6.,p,8p,8g,8a,8c6,8a,d6,8p,d6,8p,c6,8b,a.,8g,8a,8c6,8a,2c6,d6,b,a,g.,8p,g,2d6,2c6.,p,8g,8a,8c6,8a,e6,8p,e6,8p,d6.,p,8p,8g,8a,8c6,8a,2g6,b,c6.,8b,a,8g,8a,8c6,8a,2c6,d6,b,a,g.,8p,g,2d6,2c6.";
tone() example from documentation
//char *song = (char *)"2.34kHzBeeps:d=4,o=7,b=240:d,p,d,p,d,p,d,p";
int melody[] = {1908,2551,2551,2273,2551,0,2024,1908}; //C4,G3,G3,A3,G3,0,B3,C4
// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {4,8,8,4,4,4,4,4};