General Arduino

NOOB Light & Sound

userHead Adam.Johnson 2023-10-23 19:46:07 194 Views2 Replies

Hello everyone,

I really need help. I'm a total noob & I don't have a clue how to write code. Someone's very kindly sorted my light animtion, but I need a couple of sounds to play depending on buton posiion, the other when a mometarybuttonis  pressed.

I'm using an Arduino Uno & df player.

Don't seem to be able to upload my code so will post it later etc.

 

Thanks in advance if you're able to help 🙂

 

 

2023-10-24 10:43:38

Are you using the DFPlayer pro or DFPlayer mini? And please post your code and I'm happy to help you out.

userHeadPic Yeez_B
Adam.Johnson wrote:

Hi Yeez_BThank you so much! It's the Mini version of the player & I have a speaker. Not got a resistor as I dont need to limit the sound form the small speaker.For context, I'm building a Ghostbusters backpack for my son. I'd like my 2-position flick switch (we'll call it power) to play the PackOn sound when set to On, & PackOff when flicked Off.There's a third sound, PackLoop, to play when a momentary switch (trigger) is pressed & the sound stops when the trigger is released.I'm fairly sure I wired everything up properly (based on previous advice), but initially I got no sound with TX & RX crossed. I was advised to use the serial wire instead, but that only got me random playbacks (no lights) regardless of switch positions. I stripped the audio off the board so I could have working lights for a recent Con.The mp3s are renamed as per DF Player guidance & should be 01 - PackOn, 02 - PackOff, & 03 is PackLoop. They're in the G drive link withe the lighting code file.Regards

Adam

 

https://drive.google.com/drive/folders/1NVk_x_1dRg2AHJqKFqgF1rt0BRX63NyD?usp=drive_link

2023-10-25 03:47:44
1 Replies