80Views2Replies

Author Options:

I need assistance please with trying to run 2 arduino codes at once Answered

Hi.

I am new to programming with Arduino so basically I am noob at this and I only know the basic etc.

but what I want to do is be able to run 2 codes at the same time, the codes are soundreactive led and relay control via a serial port and because of this I am having problems combing them both don't if any one help ,e with this.

Here's the code that I ended up creating.(Testing Sound reactive Led with plug control)

as well added the 2 codes that I tried to combine.

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
caitlinsdad
caitlinsdad

4 years ago

Do you have your two sketches working on their own? You are trying to turn the LED on and off by triggering it with the sound and by hitting a key on the computer? Trying to activate a relay switch is the same as lighting an LED but I don't see any kind of relay in your circuit.

0
JohnR267
JohnR267

Reply 4 years ago

Hey Cait both scripts work on their own and I do have a relay its just hidden in a plug box, as you can see in the image there is a Gray cable coming into the container where the arduino uno is installed that is what the relay is connected up to .

See as I wanted to use the Sound reactive Led to manage some led strips but of course I am just testing to see if we can get these two scripts to work along side rather and of course want the plug control script to manage a set of plugs in my work area via the Serial port.

Would really appreciate if you could help me at all as I am kinda useless at this.

Feature Commentflag[delete]