Here’s basic example of how you can use one wire to easily communicate between two arduinos.Slave Arduino
pinMode(1, INPUT); //pin 1 is the single wire connection
pinMode(7,OUTPUT); //pin 7 is connected to an LED
val = digitalRead(1);
So basically how this works is this slave code will read any input coming from pin 1 and translate that to an output on pin 7. This can be used to make two arduinos blink LEDs in sync or do other cool stuff over wire.
Here’s a vid of this idea operating with a randomly blinking LED.