Simple communication

Morning,

is it possible to get two Arduino's to communicate via a single digital port? (I know it can be done via serial.. but im using serial for a different part of my project)

please note I am very new to arduino's I did attempted something like this.

[u]Arduino 1[/u] [u]int arduino = 6;[/u] [u]void setup {[/u] [u]pinMode(arduino, INPUT_PULLUP);[/u]

Arduino 2

int arduino1 =7;

void setup{ pinMode(arduino1, OUTPUT);

However the signal was always in a HIGH state.

Im only after a very simple ( OFF / ON ) communication.

Help!

Thanks

is it possible to get two Arduino’s to communicate via a single digital port?

Yes. Connect the output pin on Arduino 1 to the input pin on Arduino 2 and connect the GNDs

Read the state of the input pin on Arduino 2 in a loop and toggle the state of the output pin on Arduino 1 from HIGH to LOW

Ahh Cheers

i think i now know why my attempt failed.

Thanks again that was the final part of my project.

:-D

If you only need one-way communication you can send serial data using a single I/O pin and GND.

And if the two Arduinos would co-ordinate their listening and talking they could take it in turns for two-way communication.

...R

i think i now know why my attempt failed.

[wild guess]No common GND[/wild guess]