Go Down

Topic: blinking leds and play sound clip (Read 421 times) previous topic - next topic


Hello all!
I'm very new to the arduino and coding in general. So I'm kindly asking your help, firstly if this is something that is doable and secondly, how should I proceed to do it? I have arduino uno board, I got from my friend.

So here's what I would need to accomplish:
first set 5 leds that are off, second set 5 leds that are on, speaker and 5 switches.
Idea is that second set of leds are somehow connected to the switches, when a switch is closed the corresponding led stays on and the other 4 leds turn of, while a short sound clip is played and the first set of 5 leds blink randomly. This would be like ~3seconds, after that return to starting situation.

I'll attach a sketch to help visualize the project.


Jan 19, 2019, 10:58 am Last Edit: Jan 19, 2019, 11:04 am by PaulRB

For paying sound clips, I would recommend a DFPlayer Mini. Put all your sound clips onto a micro-SD card in MP3 format using a pc. Put the SD card into the player. Connect the player to a small speaker and to a digital pin on the Arduino. You will need to install the software serial library and use it in your sketch to instruct the player when to play and which clip to play.

For your LEDs and switches, you should just have enough pins, I think. You can use the analog pins as digital pins.

Go Up