two buttons to control audio

Hello Folks! :slight_smile:

I got a little problem with my Arduino project and couldn't find a fitting tutorial about this :
I want to control audio with two buttons. I want to play a sound effect constantly on two objects. When one Button on one Object is pushed, the Sound should stop on that one object. When both Buttons on both objects are pushed at the same moment, I want to play a different sound.

So Soundtrack1 is playing constantly on both objects. Both Objects have their own Speaker
Each Object turns off Soundrack1, as long as its button is pulled down and starts playing Soundrack1 again when the Button is no longer pulled down
Only when both buttons are pulled down at the same time, both objects play Soundtrack2

The picture shows how I connected the Buttons

Every help is very appreciated! Thank u very much :slight_smile:

So what's the problem? What are these "objects"? Can you play each of the tracks, one at a time? Do you have any code at all that we can help with?

Steve

I tried to combine Scripts from different Tutorials but they didn't work out so far :confused:
Sorry for being an absolute Noob btw.
I found a Tutorial about using Processing to play sound but i don't know how to control it with the Buttons.
I also found this Tutorial about controlling different LEDs with different Buttons but don't know how to make it work with Sound :confused:

The Objects are very big and not moveable. They are both connected to my Laptop where the Soundfiles are coming from. They both play Soundtrack1 constantly. When one of these Objects is activated by pushing its Button, the Sound will stop there but the other Object continues with playing the Soundtrack1 until both objects have their Buttons pressed at the same time. Then Soundtrack2 should play.
It's not supposed to play Soundrack1 and Soundtrack2 at the same time.

Hope you can help me a little. If you know a good Tutorial it will help a lot too! This is more complicated then I thought :confused:

Sorry you’re still missing almost every useful detail.

If you have “objects” with switches and they are connected to a laptop why do you need the Arduino? What is it doing? And what is actually playing the sounds? Is it the “objects” or the laptop or the Arduino? If the sounds “are coming from” the laptop where are they going to? The Arduino? How do they get there?

And please don’t post pictures of text. Post the actual text instead.

Steve

mochimaid:
The picture shows how I connected the Buttons

Every help is very appreciated! Thank u very much :slight_smile:

Problem: there's no connection to A0 when both buttons are open circuit - so the pin will float.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.