Virtual light communication

arduinocommunicationldrledlight

I have to design a project that uses an LED to transmit data and a LDR to receive the data or signal from the LED. But the problem is I have to use two Arduino UNO boards, one for LED transmit and another for LDR to receive. I know we can just use one Arduino board, but in my condition, my project is to have another advanced application that requires using two Arduino boards and have to separate the LED and LDR .So, how can the led transmit data? For example speed of car, so that LDR can receive data and display at the LCD? How to connect between the two Arduino?

Best Answer

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