bitfogav wrote:I was going to say isn't that the wrong way around for the piezo connections? but I see you have now updated your post
How did you get on with this ZephaniahNoah? I was hoping to try out this too

It went well. Any time I wanted my game to play a sound I just added:
tone(9,
frequency,
duration);
However, if I wanted to play a little jingle when the player died I would have to put a delay(
X); and set X to the previous tone's duration. For instance, if I were to just do... :
Code: Select all
tone(9, 100, 100);
tone(9, 200, 100);
tone(9, 300, 100);
...it would play all sounds at once. But this... :
Code: Select all
tone(9, 100, 100);
delay(100);
tone(9, 200, 100);
delay(100);
tone(9, 300, 100);
...plays each sound separately. But of course this wouldn't work so well if I wanted a dyeing animation because delay stops the whole program for that amount of time causing the screen to turn black. I don't mind this so much but for music obviously this would be terrible. There is some kind of timer that subtracts from a variable until it equals zero then continues the code without stopping the whole program, but I haven't tried that.
The link
brad provided was very useful and I was able to look up pretty much everything else on the web but other than that it was quite simple.