Communication between arduino boards using digital output to input?

Hello,
I have a Mega and a Nano, and would like to command the Nano from the Mega. I am currently thinking about connecting the two boards via digital pins. So, connecting 3 digital outputs on the mega to 3 digital inputs on the nano. I am guessing I should also connect up their grounds ? Is this method ok ? I'd then send a binary signal from the mega to the nano, where the nano would interpret and act accordingly. I don't need to communicate from the nano to the mega. I have looked at serial communications, but it seems to complicated for my simple communication purposes. Would I be right.
Thanks

This is not a problem if they both run on the same voltage Vcc. If the nano is running on a lower Vcc, you will need to reduce the input voltage via a voltage divider.

You need Gnd connected for a signal return path.

Weedpharma

Thanks for the reply Weedpharma,
when you say that they should run on the same voltage, do you mean that both boards should be connected to the same feed?

Also, what do you mean by signal return path ?
Thanks

TonyStark2:
Hello,
I have a Mega and a Nano, and would like to command the Nano from the Mega. I am currently thinking about connecting the two boards via digital pins. So, connecting 3 digital outputs on the mega to 3 digital inputs on the nano.
...SNIP....
I have looked at serial communications, but it seems to complicated for my simple communication purposes.

If your digital signals do not change often AND if they remain in a given state for a reasonable time (50 millisecs or more) it will be easy for the code on the Nano to detect the signals with digitalRead()

However if the signals change frequently or are very short lived you will probably need interrupts to detect the changing signals. In that case it would be much easier to use serial communications.

...R

TonyStark2:
Thanks for the reply Weedpharma,
when you say that they should run on the same voltage, do you mean that both boards should be connected to the same feed?

Also, what do you mean by signal return path ?
Thanks

If both are powered by 5v (same or different powersupply) then the signal outputs and inputs can handle the 5v?

If the mega has 5v supply, and the nano has a 3.3v supply, the 5v output will overload the input and possibly damage the nano.
m
As a battery needs two connections, so does a signal. Both devices need to have their gnd connected to each other. This is the return path for the data output.

Weedpharma