Arduino to Arduino digital read/write

Hi there.

I have a project that involves an mega and an uno. The uno handles communications, and I just need it to send a "high" or "low" value to the mega, depending on what commands the uno receives. Would this be as simple as having the two controllers share a common ground, connecting a digital pin on the uno to a digital pin on the mega, and just using digitalread and digitalwrite on the appropriate controller? I've looked around, but I can't really find a clear answer to this.


Yes it is that simple.

Thanks a lot!

But they have to be powered on and off at the same time. Such as when they share a power supply. You have to ensure that neither of them puts an active HIGH into the other one when it is turned off. In that case, the other one can be parasitically powered through the input protection diode.