virtual light communication
You can use the following library where IRtest2.ino does both tx and rx, depending upon it finding the receiver. There are other examples of doing just transmit and just receive.

Another receiver code that is more realtime. InputCapture.ino