This final recipe in this chapter takes all the previous recipes in this chapter and combines them to complete the banana power musical machine. Beyond the previous recipes, we will need to create an event loop that combines all this logic into one structure that can handle all the four touchpads and their related audio files and pixels. After going through this recipe, you will be able to create generic event loops and handlers that can be extended to meet the varying needs of the embedded projects you might create.
Creating an event loop to handle all touch events
Getting ready
You will need access to the REPL on Circuit Playground Express to run the code presented in this recipe.