I have a small but simple question, I guess. Right now, with the example of the tutorial I am able to play a melody with my arduino and a piezo speaker. With the code I am able to adjust the melody, the speed and the intervals in between the tones rather easy. However, I want to manually tell the arduino when to play the next tone by pressing a button. Is this possible?
For example, if I have a melody cddceeccee, can I then play the first note (c) on the first push on the button, the second tone (d) on the second push of the button, the third note (d) on after that? This way I could manually determine the speed and rhythm of the song...? Ofcourse I know the basics of reading a digital switch button, but I don't now how to let that button progress a tone by each press. Who can help me out here?