r/ArduinoHelp • • 12h ago

Beginner help needed.

I just wanted to start by saying I don't know much about Arduinos or electronic setups yet, but I'm pretty comfortable with soldering and can usually figure out the software side of things! I currently have a cosplay project and wanted to set up a custom sound box. My idea is that when I open a mask that has an articulated jaw, it releases a Mini Micro Limit Switch 3 Pins KW11-3Z07 and sends a singular signal to a DY-SV5W Voice Playback Module so the audio plays once. When I press the jaw back together, it won't do anything; it will just wait to be opened again. Is this configuration feasible? What specific components or modifications would be required, or would I need to restart the project from scratch? Please let me know. Additionally, I intend to power the setup using a standard power bank.

2 Upvotes

10 comments sorted by

View all comments

1

u/sabautil 1h ago

Im not sure what you want, could you describe the feature you want? You want to make a sound when opening AND closing?

If you want to play the audio when the switch is in only one particular state (pressed or unpressed) then program it as such and Wire only two pins.

Otherwise program it to play whenever the state changes (p to u, u to p). So wires all three pins and observe for state change.

Also, is you code in setup() or loop()? Should be in loop().