Hi
Beginner. I would be really grateful if someone could paste me code for this:
I want to make a joke bin that plays a different sound effect (wav. file) upon opening the lid. The sound effects are monster growls and eating sounds, like there is a trash beast eating the rubbish.
I have 23 different sound effects (wav. files). Each sound is 5 seconds max. I have 23 sounds, as it would be boring for the same sound to play each time. So I want the 23 sound effects to play on rotation. For example, 1st lid opening - sound one only plays. 2nd lid opening - sound two only plays, 3rd lid opening - sound three only plays, etc. I don't want all 23 sounds to play at once.
I have the following components:
Magnetic reed switch to position on the bin lid.
Micro SD card shield module
CQRobot speaker - 3 Watt 8 Ohm
If you could tell me which pins to put the wires into - that would be a great help.
Thank you very much.