Now that we know the circuit is working, it’s time for the show! Four copyright-friendly songs have been chosen from the public domain:
These four songs are included as four separate programs in the project zip archive download. You can download play them directly to make sure they sound right, and you can use them in other projects.
The four songs have been incorporated into one master program, CarolingDeviceWithLights.bs2. In this project, we’re going to use four of the switch's five positions to play four different songs, and use the fifth position to stop playing a song when the user desires. As each song plays, the LEDs will blink in a unique pattern.
Choose your own songs!
Just because these four songs were chosen for this application, doesn't mean that you need to use them too - get creative! Pick four of your favorite holiday tunes and search the internet for the sheet music. Then, use the Playing Sheet Music with the Piezospeaker Mini Project to transform that sheet music into PBASIC code. Finally, read through How the Caroler Works to see how a song gets incorporated into the Caroling Device main code.