- We must next create a counter that will track button presses. This counter will let the program know which note should be sounded when blown as well as which NeoPixel and color should be on.
- We declare the counter outside of the following while loop so that it doesn’t get reset back to 0 at the beginning of each loop.
#Create a counter for tracking button presses #Declared outside scope of while loop so it doesn't get reset to 0 at the beginnning of every loop! counter = 0
Page last edited March 08, 2024
Text editor powered by tinymce.