Connect output pin of arduino to another arduino's input pin

Hello!

Context:
I'm currently developing an installation that requires one arduino UNO for controlling lighting and another one for controlling sound with a VS1053 mp3 shield. The interaction between both lighting and sound is defined by 3 HC-SR04 ultrasound sensors which take 6 arduino pins total. I want to have the first arduino process the sensors' signals and just tell the other one when a person is nearby or not. Both boards will be powered through the VIN pin, fed from a 12V 2A power supply

Question:
Can I get one output pin in the first arduino to send "HIGH" or "LOW" to an input pin in the second arduino? Is the diagram I have below for the connection correct or should something be changed? I have tried I2C communication but it somehow interferes with the VS1053 shield I am using and I believe if what I'm planning to do works, it'll be simpler to execute.

Thank you for your help! :slight_smile:

Post a link to the shield. There might be more than one.
The Sparkfun one seems to use pin8 for reset.

Pin 5, 10, and A0-A5 seem to be free (on the Sparkfun shield), so why not use one Arduino.
https://learn.sparkfun.com/tutorials/mp3-player-shield-hookup
Leo..

This is the shield I am using:
http://www.geeetech.com/wiki/index.php/Arduino_MP3_shield_board_with_TF_card

I've developed other projects with this same shield and none of the digital pins are free, only the analog pins 0-5. However, just the HC-SR04 sensors would occupy all of these and I also need 2 more digital pins for two sets of LED strips. That's why I decided to use two arduinos instead of one. I havent been able to find any other solution to making them communicate and I think my proposal of connection would be the easiest if it is possible

That page has a diagram that shows D8 also being used, and D3,4,5,10 plus all the analogue pins free.

Yes, you can connect two Arduinos that way (and even share 5volt power).
Avoid a 12volt supply if possible. It just heats up the regulator(s).
9volt (on the DC socket) is more than enough, and easier on the voltage regulators.
Leo..

Thank you! Perhaps in my other projects I made some mistake because using those free digital pins didn't allow the shield to work properly. I will attempt connecting them that way.

You can actually see if pins are used by looking at the traces on the circuit board (both sides).
Functions of the used pins are also printed on the board.

Good open source projects have pdf and/or Eagle layout files included.
Couldn’t find any for this Geetech board.
Leo…

I have tried I2C communication but it somehow interferes with the VS1053 shield I am using and I believe if what I'm planning to do works, it'll be simpler to execute.

A VS1053 does not use I2C communications so it will not interfere with them. You had something else wrong.

We see this over and over. Beginners trying to use two Arduinos when they think they have run out of pins. Their are much better solutions than two processors 95% of the time. You are not in the 5% here.

Wawa:
Good open source projects have pdf and/or Eagle layout files included.
Couldn't find any for this Geetech board.
Leo..

Yes you're right, this isn't a particularly great shield, thankfully I have managed to use it with the SFEMP3 library. I would get a better shield but sadly this is the only one I managed to find down here in south america.

Grumpy_Mike:
Beginners trying to use two Arduinos when they think they have run out of pins. Their are much better solutions than two processors 95% of the time. You are not in the 5% here.

Thanks mike, I will follow your suggestion and try to make my project out of one arduino. I'll try connecting the 3 HC-SR04 sensors to the 6 analog pins and then try using two of the free PWM pins (D3,D5,D10) to connect my LED strips. Hopefully it'll work.

Thanks again to both of you.